Let a queued message be taken back into the composer
This commit is contained in:
@@ -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] ?? []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user