Sfoglia il codice sorgente

fix clearing drafts. setting empty drafts was never really allowed (the error was there all the time), but checks were easygoing before

B. Petersen 3 anni fa
parent
commit
b08d9425e3
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      deltachat-ios/Chat/DraftModel.swift

+ 1 - 1
deltachat-ios/Chat/DraftModel.swift

@@ -49,7 +49,7 @@ public class DraftModel {
     }
     }
 
 
     public func save(context: DcContext) {
     public func save(context: DcContext) {
-        if text == nil && quoteMessage == nil {
+        if (text?.isEmpty ?? true) && quoteMessage == nil {
             context.setDraft(chatId: chatId, message: nil)
             context.setDraft(chatId: chatId, message: nil)
             return
             return
         }
         }