فهرست منبع

don't add message on DC_EVENT_MSGS_CHANGED if message is a draft

cyberta 3 سال پیش
والد
کامیت
7505ea8b99
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      deltachat-ios/Chat/ChatViewController.swift

+ 2 - 1
deltachat-ios/Chat/ChatViewController.swift

@@ -1266,7 +1266,8 @@ class ChatViewController: UITableViewController {
         } else {
         } else {
             // new outgoing message
             // new outgoing message
             let msg = dcContext.getMessage(id: messageId)
             let msg = dcContext.getMessage(id: messageId)
-            if msg.chatId == chatId {
+            if msg.state != DC_STATE_OUT_DRAFT,
+               msg.chatId == chatId {
                 if let newMsgMarkerIndex = messageIds.index(of: Int(DC_MSG_ID_MARKER1)) {
                 if let newMsgMarkerIndex = messageIds.index(of: Int(DC_MSG_ID_MARKER1)) {
                     messageIds.remove(at: newMsgMarkerIndex)
                     messageIds.remove(at: newMsgMarkerIndex)
                 }
                 }