Added missing feature flag for setting autofill policy on load (#10467)

* Added missing feature flag

* Fixed comment

* reverted change

* moved feature flag check higher up
This commit is contained in:
SmithThe4th 2024-08-09 13:22:13 -04:00 committed by GitHub
parent d1c3ec4a76
commit a64a676ebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 2 deletions

View File

@ -33,6 +33,7 @@ export default class RuntimeBackground {
private pageDetailsToAutoFill: any[] = [];
private onInstalledReason: string = null;
private lockedVaultPendingNotifications: LockedVaultPendingNotificationsData[] = [];
private extensionRefreshIsActive: boolean = false;
constructor(
private main: MainBackground,
@ -89,6 +90,10 @@ export default class RuntimeBackground {
return false;
};
this.extensionRefreshIsActive = await this.configService.getFeatureFlag(
FeatureFlag.ExtensionRefresh,
);
this.messageListener.allMessages$
.pipe(
mergeMap(async (message: any) => {
@ -228,7 +233,10 @@ export default class RuntimeBackground {
// `getAllDecryptedForUrl` and is anticipated to be refactored
await this.main.refreshBadge();
await this.main.refreshMenu(false);
if (this.extensionRefreshIsActive) {
await this.autofillService.setAutoFillOnPageLoadOrgPolicy();
}
break;
}
case "addToLockedVaultPendingNotifications":
@ -248,8 +256,11 @@ export default class RuntimeBackground {
}, 2000);
await this.configService.ensureConfigFetched();
await this.main.updateOverlayCiphers();
if (this.extensionRefreshIsActive) {
await this.autofillService.setAutoFillOnPageLoadOrgPolicy();
}
}
break;
case "openPopup":
await this.main.openPopup();