Fix crash

pull/352/head
Niels Andriesse 3 years ago
parent e945a6779f
commit 646910d115

@ -135,6 +135,7 @@ final class LinkDeviceVC : BaseVC, UIPageViewControllerDataSource, UIPageViewCon
}
@objc private func handleConfigurationMessageReceived() {
TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = OWSIdentityManager.shared().identityKeyPair()!.hexEncodedPublicKey
DispatchQueue.main.async {
self.navigationController!.dismiss(animated: true) {
let pnModeVC = PNModeVC()

@ -160,9 +160,9 @@ extension MessageReceiver {
}
// Notification
UserDefaults.standard[.hasSyncedConfiguration] = true
NotificationCenter.default.post(name: .configurationMessageReceived, object: nil)
// Closed groups
let allClosedGroupPublicKeys = storage.getUserClosedGroupPublicKeys()
NotificationCenter.default.post(name: .configurationMessageReceived, object: nil)
for closedGroup in message.closedGroups {
guard !allClosedGroupPublicKeys.contains(closedGroup.publicKey) else { continue }
handleNewClosedGroup(groupPublicKey: closedGroup.publicKey, name: closedGroup.name, encryptionKeyPair: closedGroup.encryptionKeyPair,

Loading…
Cancel
Save