mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-07 09:31:31 +01:00
reload callback
This commit is contained in:
parent
9a4611ec5a
commit
79c15a1841
@ -20,7 +20,7 @@ export class LockService implements LockServiceAbstraction {
|
||||
private collectionService: CollectionService, private cryptoService: CryptoService,
|
||||
private platformUtilsService: PlatformUtilsService, private storageService: StorageService,
|
||||
private messagingService: MessagingService, private searchService: SearchService,
|
||||
private lockedCallback: () => Promise<void>) {
|
||||
private lockedCallback: () => Promise<void> = null, private reloadCallback: () => Promise<void> = null) {
|
||||
}
|
||||
|
||||
init(checkOnInterval: boolean) {
|
||||
@ -49,7 +49,7 @@ export class LockService implements LockServiceAbstraction {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isLocked()) {
|
||||
if (await this.isLocked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -135,6 +135,9 @@ export class LockService implements LockServiceAbstraction {
|
||||
clearInterval(this.reloadInterval);
|
||||
this.reloadInterval = null;
|
||||
this.messagingService.send('reloadProcess');
|
||||
if (this.reloadCallback != null) {
|
||||
await this.reloadCallback();
|
||||
}
|
||||
}
|
||||
}, 10000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user