[bug] Store collapsedGroupings in accountSettings (#694)

This commit is contained in:
Addison Beck 2022-02-25 07:03:13 -05:00 committed by GitHub
parent 1cbc119ad8
commit 65219f5705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,6 @@ export class AccountData {
GeneratedPasswordHistory[]
> = new EncryptionPair<GeneratedPasswordHistory[], GeneratedPasswordHistory[]>();
addEditCipherInfo?: any;
collapsedGroupings?: string[];
eventCollection?: EventData[];
organizations?: { [id: string]: OrganizationData };
providers?: { [id: string]: ProviderData };
@ -105,6 +104,7 @@ export class AccountSettings {
biometricLocked?: boolean;
biometricUnlock?: boolean;
clearClipboard?: number;
collapsedGroupings?: string[];
defaultUriMatch?: UriMatchType;
disableAddLoginNotification?: boolean;
disableAutoBiometricsPrompt?: boolean;

View File

@ -383,14 +383,14 @@ export class StateService<
async getCollapsedGroupings(options?: StorageOptions): Promise<string[]> {
return (
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
)?.data?.collapsedGroupings;
)?.settings?.collapsedGroupings;
}
async setCollapsedGroupings(value: string[], options?: StorageOptions): Promise<void> {
const account = await this.getAccount(
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())
);
account.data.collapsedGroupings = value;
account.settings.collapsedGroupings = value;
await this.saveAccount(
account,
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())