Explorar o código

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

B. Petersen %!s(int64=3) %!d(string=hai) anos
pai
achega
b08d9425e3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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) {
-        if text == nil && quoteMessage == nil {
+        if (text?.isEmpty ?? true) && quoteMessage == nil {
             context.setDraft(chatId: chatId, message: nil)
             return
         }