1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

[PM-18959] - retain popup view cache on cipher view or edit (#13742)

* clear popup view cache on tab navigation but not on view or edit cipher

* revert clearing cache on tab change

* clean up function
This commit is contained in:
Jordan Aasen
2025-03-10 10:59:07 -07:00
committed by GitHub
parent 01f6fd7ee3
commit e0b77c97ba

View File

@@ -64,8 +64,16 @@ export class PopupViewCacheService implements ViewCacheService {
filter((e) => e instanceof NavigationEnd),
/** Skip the first navigation triggered by `popupRouterCacheGuard` */
skip(1),
filter((e: NavigationEnd) =>
// viewing/editing a cipher and navigating back to the vault list should not clear the cache
["/view-cipher", "/edit-cipher", "/tabs/vault"].every(
(route) => !e.urlAfterRedirects.startsWith(route),
),
),
)
.subscribe(() => this.clearState());
.subscribe((e) => {
return this.clearState();
});
}
/**