소스 검색

always call UIApplication.shared.open() from UI thread

cyberta 4 년 전
부모
커밋
e8df5b1f26
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      deltachat-ios/Chat/ChatViewController.swift

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

@@ -1187,7 +1187,9 @@ class ChatViewController: UITableViewController {
                                     let messageId = self.dcContext.sendVideoChatInvitation(chatId: self.chatId)
                                     let inviteMessage = self.dcContext.getMessage(id: messageId)
                                     if let url = NSURL(string: inviteMessage.getVideoChatUrl()) {
-                                        UIApplication.shared.open(url as URL)
+                                        DispatchQueue.main.async {
+                                            UIApplication.shared.open(url as URL)
+                                        }
                                     }
                                 }})
         alert.addAction(ok)