2
0

Log out active user and key when user is changed or deleted or unset.

This commit is contained in:
Maarten Billemont
2020-04-04 16:30:14 -04:00
parent 975743adec
commit fa0c80d6b3
13 changed files with 52 additions and 44 deletions

View File

@@ -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;