1
0
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:
SmithThe4th 2024-08-19 11:39:46 -04:00 committed by GitHub
parent 0af09c543c
commit 97938464e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();
}
}