Volatile draft to restore the composer after an edit. (#2996)

This commit is contained in:
Mauro
2024-07-02 16:48:50 +02:00
committed by GitHub
parent 457bd3160a
commit 94f98345b0
7 changed files with 280 additions and 23 deletions
@@ -74,7 +74,10 @@ enum ComposerDraftServiceError: Error {
// sourcery: AutoMockable
protocol ComposerDraftServiceProtocol {
func saveDraft(_ draft: ComposerDraftProxy) async -> Result<Void, ComposerDraftServiceError>
func saveVolatileDraft(_ draft: ComposerDraftProxy)
func loadDraft() async -> Result<ComposerDraftProxy?, ComposerDraftServiceError>
func loadVolatileDraft() -> ComposerDraftProxy?
func clearDraft() async -> Result<Void, ComposerDraftServiceError>
func clearVolatileDraft()
func getReply(eventID: String) async -> Result<TimelineItemReply, ComposerDraftServiceError>
}