diff --git a/webapp/src/components/VaultPage.tsx b/webapp/src/components/VaultPage.tsx index 8479a28..d0bda2d 100644 --- a/webapp/src/components/VaultPage.tsx +++ b/webapp/src/components/VaultPage.tsx @@ -703,19 +703,12 @@ function folderName(id: string | null | undefined): string { async function handleUnarchiveSelected(cipher: Cipher): Promise { setBusy(true); try { - await props.onUnarchive(cipher); - if (sidebarFilter.kind === 'archive') { - const remaining = filteredCiphers.filter((item) => item.id !== cipher.id); - setSelectedMap((prev) => { - const next = { ...prev }; - delete next[cipher.id]; - return next; - }); - setSelectedCipherId(remaining[0]?.id || ''); - if (isMobileLayout && remaining.length === 0) { - setMobilePanel('list'); - } - } + await props.onBulkUnarchive([cipher.id]); + setSelectedMap((prev) => { + const next = { ...prev }; + delete next[cipher.id]; + return next; + }); } finally { setBusy(false); } diff --git a/webapp/src/components/vault/VaultDetailView.tsx b/webapp/src/components/vault/VaultDetailView.tsx index 7723249..4ffe7c7 100644 --- a/webapp/src/components/vault/VaultDetailView.tsx +++ b/webapp/src/components/vault/VaultDetailView.tsx @@ -31,8 +31,8 @@ interface VaultDetailViewProps { onDownloadAttachment: (cipher: Cipher, attachmentId: string) => void; onStartEdit: () => void; onDelete: (cipher: Cipher) => void; - onArchive: (cipher: Cipher) => Promise; - onUnarchive: (cipher: Cipher) => Promise; + onArchive: (cipher: Cipher) => void | Promise; + onUnarchive: (cipher: Cipher) => void | Promise; } export default function VaultDetailView(props: VaultDetailViewProps) {