diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index cc89f532d..4faa52ac1 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -952,7 +952,7 @@ static NSTimeInterval launchStartedAt; [self stopClosedGroupPoller]; [self stopOpenGroupPollers]; [LKPublicChatManager.shared stopPollers]; - bool wasUnlinked = [NSUserDefaults.standardUserDefaults boolForKey:@"wasUnlinked"]; + BOOL wasUnlinked = [NSUserDefaults.standardUserDefaults boolForKey:@"wasUnlinked"]; [SignalApp resetAppData:^{ // Resetting the data clears the old user defaults. We need to restore the unlink default. [NSUserDefaults.standardUserDefaults setBool:wasUnlinked forKey:@"wasUnlinked"]; diff --git a/Signal/src/Loki/View Controllers/HomeVC.swift b/Signal/src/Loki/View Controllers/HomeVC.swift index 60cccda12..07f5dd51f 100644 --- a/Signal/src/Loki/View Controllers/HomeVC.swift +++ b/Signal/src/Loki/View Controllers/HomeVC.swift @@ -175,6 +175,7 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, UIScrol reload() // Clear all data if this is a secondary device if UserDefaults.standard[.masterHexEncodedPublicKey] != nil { + UserDefaults.standard[.wasUnlinked] = true NotificationCenter.default.post(name: .dataNukeRequested, object: nil, userInfo: nil) } }