support for logout notification
This commit is contained in:
parent
3c43265878
commit
45da8aa9eb
|
@ -11,4 +11,6 @@ export enum NotificationType {
|
|||
SyncFolderUpdate = 8,
|
||||
SyncCipherDelete = 9,
|
||||
SyncSettings = 10,
|
||||
|
||||
LogOut = 11,
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
|||
|
||||
constructor(private userService: UserService, private syncService: SyncService,
|
||||
private appIdService: AppIdService, private apiService: ApiService,
|
||||
private cryptoService: CryptoService) { }
|
||||
private cryptoService: CryptoService, private logoutCallback: () => Promise<void>) { }
|
||||
|
||||
async init(environmentService: EnvironmentService): Promise<void> {
|
||||
this.inited = false;
|
||||
|
@ -136,6 +136,9 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
|||
// Stop so a reconnect can be made
|
||||
await this.signalrConnection.stop();
|
||||
break;
|
||||
case NotificationType.LogOut:
|
||||
this.logoutCallback();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue