[PM-8290] Refresh vault after saving item collections (#10053)

This commit is contained in:
Rui Tomé 2024-07-31 15:27:20 +01:00 committed by GitHub
parent 537fa67b09
commit 766c2f4b9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 2 deletions

View File

@ -86,7 +86,10 @@ import {
BulkShareDialogResult,
openBulkShareDialog,
} from "./bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component";
import { openIndividualVaultCollectionsDialog } from "./collections.component";
import {
CollectionsDialogResult,
openIndividualVaultCollectionsDialog,
} from "./collections.component";
import { FolderAddEditDialogResult, openFolderAddEditDialog } from "./folder-add-edit.component";
import { ShareComponent } from "./share.component";
import { VaultBannersComponent } from "./vault-banners/vault-banners.component";
@ -573,7 +576,14 @@ export class VaultComponent implements OnInit, OnDestroy {
}
async editCipherCollections(cipher: CipherView) {
openIndividualVaultCollectionsDialog(this.dialogService, { data: { cipherId: cipher.id } });
const dialog = openIndividualVaultCollectionsDialog(this.dialogService, {
data: { cipherId: cipher.id },
});
const result = await lastValueFrom(dialog.closed);
if (result === CollectionsDialogResult.Saved) {
this.refresh();
}
}
async addCipher() {