From 6f117b990192ddbe3b630effc77f4ef3c2bf248c Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Mon, 6 Jun 2022 08:56:56 -0400 Subject: [PATCH] [fix] Generator settings not persisting across web sessions (#824) --- common/src/services/state.service.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 3714b3e7..cb3a8a5e 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -1769,52 +1769,52 @@ export class StateService< async getPasswordGenerationOptions(options?: StorageOptions): Promise { return ( - await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())) + await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())) )?.settings?.passwordGenerationOptions; } async setPasswordGenerationOptions(value: any, options?: StorageOptions): Promise { const account = await this.getAccount( - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()) ); account.settings.passwordGenerationOptions = value; await this.saveAccount( account, - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()) ); } async getUsernameGenerationOptions(options?: StorageOptions): Promise { return ( - await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())) + await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())) )?.settings?.usernameGenerationOptions; } async setUsernameGenerationOptions(value: any, options?: StorageOptions): Promise { const account = await this.getAccount( - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()) ); account.settings.usernameGenerationOptions = value; await this.saveAccount( account, - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()) ); } async getGeneratorOptions(options?: StorageOptions): Promise { return ( - await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())) + await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())) )?.settings?.generatorOptions; } async setGeneratorOptions(value: any, options?: StorageOptions): Promise { const account = await this.getAccount( - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()) ); account.settings.generatorOptions = value; await this.saveAccount( account, - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()) ); }