mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[PM-7710] Avoid re-indexing ciphers on current tab component and re-setting null storage values for popup components (#8908)
* [PM-7710] Avoid re-indexing ciphers on current tab component and re-setting null storage values for popup components * [PM-7710] Avoid re-indexing ciphers on current tab component and re-setting null storage values for popup components
This commit is contained in:
@@ -46,7 +46,9 @@ export class BrowserSendStateService {
|
||||
* the send component on the browser
|
||||
*/
|
||||
async setBrowserSendComponentState(value: BrowserSendComponentState): Promise<void> {
|
||||
await this.activeUserBrowserSendComponentState.update(() => value);
|
||||
await this.activeUserBrowserSendComponentState.update(() => value, {
|
||||
shouldUpdate: (current) => !(current == null && value == null),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get the active user's browser component state
|
||||
@@ -60,6 +62,8 @@ export class BrowserSendStateService {
|
||||
* @param { BrowserComponentState } value set the scroll position and search text for the send component on the browser
|
||||
*/
|
||||
async setBrowserSendTypeComponentState(value: BrowserComponentState): Promise<void> {
|
||||
await this.activeUserBrowserSendTypeComponentState.update(() => value);
|
||||
await this.activeUserBrowserSendTypeComponentState.update(() => value, {
|
||||
shouldUpdate: (current) => !(current == null && value == null),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,6 +292,8 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
const ciphers = await this.cipherService.getAllDecryptedForUrl(
|
||||
this.url,
|
||||
otherTypes.length > 0 ? otherTypes : null,
|
||||
null,
|
||||
false,
|
||||
);
|
||||
|
||||
this.loginCiphers = [];
|
||||
|
||||
@@ -52,7 +52,9 @@ export class VaultBrowserStateService {
|
||||
}
|
||||
|
||||
async setBrowserGroupingsComponentState(value: BrowserGroupingsComponentState): Promise<void> {
|
||||
await this.activeUserVaultBrowserGroupingsComponentState.update(() => value);
|
||||
await this.activeUserVaultBrowserGroupingsComponentState.update(() => value, {
|
||||
shouldUpdate: (current) => !(current == null && value == null),
|
||||
});
|
||||
}
|
||||
|
||||
async getBrowserVaultItemsComponentState(): Promise<BrowserComponentState> {
|
||||
@@ -60,6 +62,8 @@ export class VaultBrowserStateService {
|
||||
}
|
||||
|
||||
async setBrowserVaultItemsComponentState(value: BrowserComponentState): Promise<void> {
|
||||
await this.activeUserVaultBrowserComponentState.update(() => value);
|
||||
await this.activeUserVaultBrowserComponentState.update(() => value, {
|
||||
shouldUpdate: (current) => !(current == null && value == null),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user