1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[PM-5500] Implement StateProvider in RouterService (#8119)

* implement StateProvider in RouterService

* Remove 'export'

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Skip parameter

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

---------

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
This commit is contained in:
rr-bw
2024-04-02 10:16:42 -07:00
committed by GitHub
parent a6e178f1e6
commit f79d159277
5 changed files with 25 additions and 36 deletions

View File

@@ -1173,23 +1173,6 @@ export class StateService<
);
}
async getDeepLinkRedirectUrl(options?: StorageOptions): Promise<string> {
return (
await this.getGlobals(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
)?.deepLinkRedirectUrl;
}
async setDeepLinkRedirectUrl(url: string, options?: StorageOptions): Promise<void> {
const globals = await this.getGlobals(
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
);
globals.deepLinkRedirectUrl = url;
await this.saveGlobals(
globals,
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
);
}
protected async getGlobals(options: StorageOptions): Promise<TGlobalState> {
let globals: TGlobalState;
if (this.useMemory(options.storageLocation)) {