Fix sign-out.
[FIXED] MP-13: Sign Out doesn't work -- when password is saved, signing out signs you right back in. Now, the saved key password is forgotten.
This commit is contained in:
parent
82b8de5e23
commit
cdfafa55cf
@ -114,6 +114,25 @@
|
||||
[self.window.rootViewController presentModalViewController:composer animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - PearlConfigDelegate
|
||||
|
||||
- (void)didUpdateConfigForKey:(SEL)configKey fromValue:(id)value {
|
||||
|
||||
[self checkConfig];
|
||||
}
|
||||
|
||||
- (void)checkConfig {
|
||||
|
||||
if ([[MPConfig get].saveKey boolValue]) {
|
||||
if (self.key)
|
||||
[self updateKey:self.key];
|
||||
} else
|
||||
[self loadStoredKey];
|
||||
|
||||
if ([[MPConfig get].iCloud boolValue] != [self.storeManager iCloudEnabled])
|
||||
[self.storeManager useiCloudStore:[[MPConfig get].iCloud boolValue] alertUser:YES];
|
||||
}
|
||||
|
||||
#pragma mark - UIApplicationDelegate
|
||||
|
||||
|
||||
@ -367,18 +386,6 @@
|
||||
[TestFlight passCheckpoint:MPTestFlightCheckpointDeactivated];
|
||||
}
|
||||
|
||||
- (void)checkConfig {
|
||||
|
||||
if ([[MPConfig get].saveKey boolValue]) {
|
||||
if (self.key)
|
||||
[self updateKey:self.key];
|
||||
} else
|
||||
[self loadStoredKey];
|
||||
|
||||
if ([[MPConfig get].iCloud boolValue] != [self.storeManager iCloudEnabled])
|
||||
[self.storeManager useiCloudStore:[[MPConfig get].iCloud boolValue] alertUser:YES];
|
||||
}
|
||||
|
||||
#pragma mark - MFMailComposeViewControllerDelegate
|
||||
|
||||
- (void)mailComposeController:(MFMailComposeViewController *)controller
|
||||
|
@ -434,6 +434,7 @@
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
[MPConfig get].saveKey = [NSNumber numberWithBool:NO];
|
||||
[[MPAppDelegate get] signOut:self];
|
||||
[[MPAppDelegate get] loadKey:YES];
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user