Log out active user and key when user is changed or deleted or unset.
This commit is contained in:
@@ -51,8 +51,6 @@
|
||||
} );
|
||||
PearlAddNotificationObserver( NSWindowWillCloseNotification, self.window, [NSOperationQueue mainQueue],
|
||||
^(id host, NSNotification *note) {
|
||||
PearlRemoveNotificationObservers();
|
||||
|
||||
NSWindow *sheet = [self.window attachedSheet];
|
||||
if (sheet)
|
||||
[self.window endSheet:sheet];
|
||||
@@ -86,6 +84,10 @@
|
||||
prof_finish( @"ui" );
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
PearlRemoveNotificationObservers();
|
||||
}
|
||||
|
||||
- (void)replaceFonts:(NSView *)view {
|
||||
|
||||
if (view.window.backingScaleFactor == 1)
|
||||
@@ -325,7 +327,7 @@
|
||||
[alert_ beginSheetModalForWindow:self.window completionHandler:nil];
|
||||
|
||||
if ([MPMacAppDelegate get].key)
|
||||
[[MPMacAppDelegate get] signOutAnimated:YES];
|
||||
[[MPMacAppDelegate get] signOut];
|
||||
} );
|
||||
}];
|
||||
}
|
||||
@@ -573,7 +575,6 @@
|
||||
}
|
||||
prof_finish( @"newSites: %@", newSites );
|
||||
|
||||
dbg( @"newSites: %@", newSites );
|
||||
if (![newSites isEqualToArray:self.sites])
|
||||
PearlMainQueue( ^{
|
||||
self.sites = newSites;
|
||||
|
Reference in New Issue
Block a user