[PM-7562] Add DuckDuckGo back to State Service (#8791)
* Add ddg back to state service * Remove getters
This commit is contained in:
parent
2916fc7404
commit
c1c6afb0f4
|
@ -660,6 +660,11 @@ export class SettingsComponent implements OnInit {
|
|||
this.form.value.enableDuckDuckGoBrowserIntegration,
|
||||
);
|
||||
|
||||
// Adding to cover users on a previous version of DDG
|
||||
await this.stateService.setEnableDuckDuckGoBrowserIntegration(
|
||||
this.form.value.enableDuckDuckGoBrowserIntegration,
|
||||
);
|
||||
|
||||
if (!this.form.value.enableBrowserIntegration) {
|
||||
await this.stateService.setDuckDuckGoSharedKey(null);
|
||||
}
|
||||
|
|
|
@ -74,6 +74,13 @@ export abstract class StateService<T extends Account = Account> {
|
|||
* Used when Lock with MP on Restart is enabled
|
||||
*/
|
||||
setPinKeyEncryptedUserKeyEphemeral: (value: EncString, options?: StorageOptions) => Promise<void>;
|
||||
/**
|
||||
* @deprecated For backwards compatible purposes only, use DesktopAutofillSettingsService
|
||||
*/
|
||||
setEnableDuckDuckGoBrowserIntegration: (
|
||||
value: boolean,
|
||||
options?: StorageOptions,
|
||||
) => Promise<void>;
|
||||
/**
|
||||
* @deprecated For migration purposes only, use getUserKeyMasterKey instead
|
||||
*/
|
||||
|
|
|
@ -4,4 +4,5 @@ export class GlobalState {
|
|||
vaultTimeoutAction?: string;
|
||||
enableBrowserIntegration?: boolean;
|
||||
enableBrowserIntegrationFingerprint?: boolean;
|
||||
enableDuckDuckGoBrowserIntegration?: boolean;
|
||||
}
|
||||
|
|
|
@ -571,6 +571,20 @@ export class StateService<
|
|||
);
|
||||
}
|
||||
|
||||
async setEnableDuckDuckGoBrowserIntegration(
|
||||
value: boolean,
|
||||
options?: StorageOptions,
|
||||
): Promise<void> {
|
||||
const globals = await this.getGlobals(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
|
||||
);
|
||||
globals.enableDuckDuckGoBrowserIntegration = value;
|
||||
await this.saveGlobals(
|
||||
globals,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use UserKey instead
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue