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:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user