mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
get feature flag when needed (#10616)
This commit is contained in:
parent
0af09c543c
commit
97938464e5
@ -33,7 +33,6 @@ export default class RuntimeBackground {
|
||||
private pageDetailsToAutoFill: any[] = [];
|
||||
private onInstalledReason: string = null;
|
||||
private lockedVaultPendingNotifications: LockedVaultPendingNotificationsData[] = [];
|
||||
private extensionRefreshIsActive: boolean = false;
|
||||
|
||||
constructor(
|
||||
private main: MainBackground,
|
||||
@ -90,10 +89,6 @@ export default class RuntimeBackground {
|
||||
return false;
|
||||
};
|
||||
|
||||
this.extensionRefreshIsActive = await this.configService.getFeatureFlag(
|
||||
FeatureFlag.ExtensionRefresh,
|
||||
);
|
||||
|
||||
this.messageListener.allMessages$
|
||||
.pipe(
|
||||
mergeMap(async (message: any) => {
|
||||
@ -234,7 +229,7 @@ export default class RuntimeBackground {
|
||||
await this.main.refreshBadge();
|
||||
await this.main.refreshMenu(false);
|
||||
|
||||
if (this.extensionRefreshIsActive) {
|
||||
if (await this.configService.getFeatureFlag(FeatureFlag.ExtensionRefresh)) {
|
||||
await this.autofillService.setAutoFillOnPageLoadOrgPolicy();
|
||||
}
|
||||
break;
|
||||
@ -257,7 +252,7 @@ export default class RuntimeBackground {
|
||||
await this.configService.ensureConfigFetched();
|
||||
await this.main.updateOverlayCiphers();
|
||||
|
||||
if (this.extensionRefreshIsActive) {
|
||||
if (await this.configService.getFeatureFlag(FeatureFlag.ExtensionRefresh)) {
|
||||
await this.autofillService.setAutoFillOnPageLoadOrgPolicy();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user