mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[PM-5568] Implement Badge Settings state provider (#8112)
* create badge settings state provider * replace state service get/set disableBadgeCounter with badge settings service equivalent * migrate disableBadgeCounter account setting to badge settings state provider * cleanup and address PR suggestions
This commit is contained in:
@@ -889,24 +889,6 @@ export class StateService<
|
||||
);
|
||||
}
|
||||
|
||||
async getDisableBadgeCounter(options?: StorageOptions): Promise<boolean> {
|
||||
return (
|
||||
(await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))
|
||||
?.settings?.disableBadgeCounter ?? false
|
||||
);
|
||||
}
|
||||
|
||||
async setDisableBadgeCounter(value: boolean, options?: StorageOptions): Promise<void> {
|
||||
const account = await this.getAccount(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
|
||||
);
|
||||
account.settings.disableBadgeCounter = value;
|
||||
await this.saveAccount(
|
||||
account,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
|
||||
);
|
||||
}
|
||||
|
||||
async getDisableChangedPasswordNotification(options?: StorageOptions): Promise<boolean> {
|
||||
return (
|
||||
(await this.getGlobals(this.reconcileOptions(options, await this.defaultOnDiskOptions())))
|
||||
|
||||
Reference in New Issue
Block a user