mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-18 20:07:58 +00:00
oc: remove and disable userContext after each call
This adds [MAPIStoreUserContext activate] method to use it instead of activateWithUser. A cleanup operation is executed after each public function so there won't be any conflicts with future calls. In practice, this will deactivate the current user context set on MAPIApp, this means two things: (1) set nil as current user context on MAPIApp and (2) remove woContext from current thread dictionary
This commit is contained in:
@@ -76,6 +76,11 @@ MAPIApplication *MAPIApp = nil;
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (MAPIStoreUserContext *) userContext
|
||||
{
|
||||
return userContext;
|
||||
}
|
||||
|
||||
- (void) setUserContext: (MAPIStoreUserContext *) newContext
|
||||
{
|
||||
/* user contexts must not be retained here ad their holder (mapistore)
|
||||
@@ -88,4 +93,9 @@ MAPIApplication *MAPIApp = nil;
|
||||
return [userContext authenticator];
|
||||
}
|
||||
|
||||
- (void) cleanup
|
||||
{
|
||||
[userContext deactivate];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user