mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Fix refresh token coding and persistence.
This commit is contained in:
@@ -66,6 +66,8 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
|
||||
// Load existing accounts from local storage
|
||||
[self loadAccounts];
|
||||
|
||||
[self registerRestClientDidRefreshTokensNotification];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -723,4 +725,17 @@ NSString *const MXKAccountManagerDataType = @"org.matrix.kit.MXKAccountManagerDa
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Homeserver Access/Refresh Token updates
|
||||
|
||||
- (void)registerRestClientDidRefreshTokensNotification
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleRestClientDidRefreshTokensNotification:) name:MXRestClientDidRefreshTokensNotification object:nil];
|
||||
}
|
||||
|
||||
- (void)handleRestClientDidRefreshTokensNotification:(NSNotification*)notification
|
||||
{
|
||||
[self saveAccounts];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user