Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
[bug] Store collapsedGroupings in accountSettings (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
addisonbeck committed Feb 25, 2022
1 parent 1cbc119 commit 65219f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/src/models/domain/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -105,6 +104,7 @@ export class AccountSettings {
biometricLocked?: boolean;
biometricUnlock?: boolean;
clearClipboard?: number;
collapsedGroupings?: string[];
defaultUriMatch?: UriMatchType;
disableAddLoginNotification?: boolean;
disableAutoBiometricsPrompt?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions common/src/services/state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 65219f5

Please sign in to comment.