mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
[bug] Store everBeenUnlocked in memory (#667)
This commit is contained in:
parent
5fad7c666f
commit
b7d9a532cb
@ -1468,20 +1468,17 @@ export class StateService<
|
|||||||
|
|
||||||
async getEverBeenUnlocked(options?: StorageOptions): Promise<boolean> {
|
async getEverBeenUnlocked(options?: StorageOptions): Promise<boolean> {
|
||||||
return (
|
return (
|
||||||
(await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))
|
(await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.profile
|
||||||
?.profile?.everBeenUnlocked ?? false
|
?.everBeenUnlocked ?? false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setEverBeenUnlocked(value: boolean, options?: StorageOptions): Promise<void> {
|
async setEverBeenUnlocked(value: boolean, options?: StorageOptions): Promise<void> {
|
||||||
const account = await this.getAccount(
|
const account = await this.getAccount(
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
this.reconcileOptions(options, this.defaultInMemoryOptions)
|
||||||
);
|
);
|
||||||
account.profile.everBeenUnlocked = value;
|
account.profile.everBeenUnlocked = value;
|
||||||
await this.saveAccount(
|
await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
|
||||||
account,
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getForcePasswordReset(options?: StorageOptions): Promise<boolean> {
|
async getForcePasswordReset(options?: StorageOptions): Promise<boolean> {
|
||||||
|
Loading…
Reference in New Issue
Block a user