This commit is contained in:
2025-12-03 12:55:51 +08:00
parent 6be90ebb10
commit 27aa723e7d
9 changed files with 120 additions and 65 deletions

View File

@@ -143,8 +143,17 @@ static NSString * const kKBSessionInstallFlagKey = @"KBSession.installInitialize
}
- (void)_onAuthChanged:(NSNotification *)note {
// KBAuthManager +shared +shared
// 使
KBAuthManager *auth = nil;
if ([note.object isKindOfClass:[KBAuthManager class]]) {
auth = (KBAuthManager *)note.object;
} else {
auth = [KBAuthManager shared];
}
// token currentUser
if (![[KBAuthManager shared] isLoggedIn]) {
if (![auth isLoggedIn]) {
self.currentUser = nil;
[self.defaults removeObjectForKey:kKBSessionUserStoreKey];
[self.defaults synchronize];
@@ -152,4 +161,3 @@ static NSString * const kKBSessionInstallFlagKey = @"KBSession.installInitialize
}
@end