mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 11:13:46 +00:00
[PM-19032] Live Sync on Desktop (#13851)
* migrate the vault-items to an observables rather than async/promises - this helps keep data in sync with the service state and avoids race conditions * migrate the view component to an observables rather than async/promises - this helps keep data in sync with the service state and avoids race conditions
This commit is contained in:
@@ -28,9 +28,6 @@ export class VaultItemsComponent extends BaseVaultItemsComponent {
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
||||
searchBarService.searchText$.pipe(distinctUntilChanged()).subscribe((searchText) => {
|
||||
this.searchText = searchText;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.search(200);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -497,7 +497,6 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.action = "view";
|
||||
await this.vaultItemsComponent.refresh();
|
||||
await this.cipherService.clearCache(this.activeUserId);
|
||||
await this.viewComponent.load();
|
||||
this.go();
|
||||
}
|
||||
|
||||
|
||||
@@ -120,9 +120,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
|
||||
}
|
||||
|
||||
async ngOnChanges() {
|
||||
await super.load();
|
||||
|
||||
if (this.cipher.decryptionFailure) {
|
||||
if (this.cipher?.decryptionFailure) {
|
||||
DecryptionFailureDialogComponent.open(this.dialogService, {
|
||||
cipherIds: [this.cipherId as CipherId],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user