lock service invokes callback on lock
This commit is contained in:
parent
848f50afe7
commit
1f2cf2bcdf
|
@ -13,7 +13,7 @@ export class LockService implements LockServiceAbstraction {
|
||||||
constructor(private cipherService: CipherService, private folderService: FolderService,
|
constructor(private cipherService: CipherService, private folderService: FolderService,
|
||||||
private collectionService: CollectionService, private cryptoService: CryptoService,
|
private collectionService: CollectionService, private cryptoService: CryptoService,
|
||||||
private platformUtilsService: PlatformUtilsService, private storageService: StorageService,
|
private platformUtilsService: PlatformUtilsService, private storageService: StorageService,
|
||||||
private messagingService: MessagingService) {
|
private messagingService: MessagingService, private lockedCallback: Function) {
|
||||||
this.checkLock();
|
this.checkLock();
|
||||||
setInterval(() => this.checkLock(), 10 * 1000); // check every 10 seconds
|
setInterval(() => this.checkLock(), 10 * 1000); // check every 10 seconds
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export class LockService implements LockServiceAbstraction {
|
||||||
this.cipherService.clearCache();
|
this.cipherService.clearCache();
|
||||||
this.collectionService.clearCache();
|
this.collectionService.clearCache();
|
||||||
this.messagingService.send('locked');
|
this.messagingService.send('locked');
|
||||||
|
this.lockedCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
async setLockOption(lockOption: number): Promise<void> {
|
async setLockOption(lockOption: number): Promise<void> {
|
||||||
|
|
Loading…
Reference in New Issue