mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
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,
|
||||
private collectionService: CollectionService, private cryptoService: CryptoService,
|
||||
private platformUtilsService: PlatformUtilsService, private storageService: StorageService,
|
||||
private messagingService: MessagingService) {
|
||||
private messagingService: MessagingService, private lockedCallback: Function) {
|
||||
this.checkLock();
|
||||
setInterval(() => this.checkLock(), 10 * 1000); // check every 10 seconds
|
||||
}
|
||||
@ -60,6 +60,7 @@ export class LockService implements LockServiceAbstraction {
|
||||
this.cipherService.clearCache();
|
||||
this.collectionService.clearCache();
|
||||
this.messagingService.send('locked');
|
||||
this.lockedCallback();
|
||||
}
|
||||
|
||||
async setLockOption(lockOption: number): Promise<void> {
|
||||
|
Loading…
Reference in New Issue
Block a user