fix(web): Update asset count when deleting assets from person page (#15416)

Call updateAssetCount() after deleting assets.
This commit is contained in:
imakida 2025-01-17 16:51:38 -10:00 committed by GitHub
parent 097183b31d
commit f40fdce658
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -328,6 +328,11 @@
} }
}; };
const handleDeleteAssets = async (assetIds: string[]) => {
$assetStore.removeAssets(assetIds);
await updateAssetCount();
};
onDestroy(() => { onDestroy(() => {
assetStore.destroy(); assetStore.destroy();
}); });
@ -404,7 +409,7 @@
{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned} {#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}
<TagAction menuItem /> <TagAction menuItem />
{/if} {/if}
<DeleteAssets menuItem onAssetDelete={(assetIds) => $assetStore.removeAssets(assetIds)} /> <DeleteAssets menuItem onAssetDelete={(assetIds) => handleDeleteAssets(assetIds)} />
</ButtonContextMenu> </ButtonContextMenu>
</AssetSelectControlBar> </AssetSelectControlBar>
{:else} {:else}