Store and restore drafts (#2898)

This commit is contained in:
Mauro
2024-06-13 14:19:38 +02:00
committed by GitHub
parent b8dea8ac4e
commit cefa38049f
31 changed files with 1384 additions and 63 deletions
@@ -133,11 +133,22 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
// MARK: - Public
func loadDraft() {
guard appSettings.draftRestoringEnabled else {
return
}
actionsSubject.send(.composer(action: .loadDraft))
}
func stop() {
// Work around QLPreviewController dismissal issues, see the InteractiveQuickLookModifier.
state.bindings.mediaPreviewItem = nil
}
func saveDraft() {
actionsSubject.send(.composer(action: .saveDraft))
}
override func process(viewAction: RoomScreenViewAction) {
switch viewAction {
case .itemAppeared(let id):