Procházet zdrojové kódy

Send messages in global queu too (might be fix for https://github.com/deltachat/deltachat-ios/issues/9#issue-356157986 issue)

humanlikedisaster před 6 roky
rodič
revize
7d301eeea0
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      deltachat-ios/ChatViewController.swift

+ 3 - 2
deltachat-ios/ChatViewController.swift

@@ -519,8 +519,9 @@ extension ChatViewController: MessageInputBarDelegate {
     
     func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
 //        messageList.append(Message(text: text, sender: currentSender(), messageId: UUID().uuidString, date: Date()))
-        
-        dc_send_text_msg(mailboxPointer, UInt32(self.chatId), text)
+        DispatchQueue.global().async {
+            dc_send_text_msg(mailboxPointer, UInt32(self.chatId), text)
+        }
         print(text)
         inputBar.inputTextView.text = String()
 //        messagesCollectionView.reloadData()