Let a queued message be taken back into the composer

This commit is contained in:
Ian Gulliver
2026-10-17 15:45:27 -07:00
parent e67576ac53
commit 658f78934c
12 changed files with 218 additions and 37 deletions
+9 -4
View File
@@ -192,15 +192,20 @@ final class Drafts {
if ok {
lostImages[send.key] = nil
} else {
let text = [send.text, composerTexts[send.key] ?? ""].filter { !$0.isEmpty }.joined(separator: "\n\n")
if !text.isEmpty {
composerTexts[send.key] = text
}
restoreText(send.key, send.text)
}
dirty = true
flush()
}
func restoreText(_ key: String, _ text: String) {
let joined = [text, composerTexts[key] ?? ""].filter { !$0.isEmpty }.joined(separator: "\n\n")
if !joined.isEmpty {
composerTexts[key] = joined
}
save()
}
func checkedAnswer(_ id: String) -> [String] {
checked[id] ?? []
}