소스 검색

fixed retain cycle newChatViewController

nayooti 5 년 전
부모
커밋
a842fb3f47
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      deltachat-ios/Controller/NewChatViewController.swift

+ 2 - 1
deltachat-ios/Controller/NewChatViewController.swift

@@ -96,7 +96,8 @@ class NewChatViewController: UITableViewController {
             forName: dcNotificationSecureJoinerProgress,
             object: nil,
             queue: nil
-        ) { notification in
+        ) { [weak self] notification in
+            guard let self = self else { return }
             if let ui = notification.userInfo {
                 if ui["error"] as? Bool ?? false {
                     self.hud?.error(ui["errorMessage"] as? String)