perf(web): asset delete (#7555)

* perf(web): asset delete

* update asset delete on search page

* don't use arrow function in class
This commit is contained in:
Michel Heusschen 2024-03-02 01:49:31 +01:00 committed by GitHub
parent 7303fab9d9
commit a4e6c43823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 40 additions and 51 deletions

View file

@ -72,7 +72,7 @@
const trashOrDelete = async (force: boolean = false) => {
isShowDeleteConfirmation = false;
await deleteAssets(!(isTrashEnabled && !force), (assetId) => assetStore.removeAsset(assetId), idsSelectedAssets);
await deleteAssets(!(isTrashEnabled && !force), (assetIds) => assetStore.removeAssets(assetIds), idsSelectedAssets);
assetInteractionStore.clearMultiselect();
};
@ -169,7 +169,7 @@
(await handleNext()) || (await handlePrevious()) || handleClose();
// delete after find the next one
assetStore.removeAsset(asset.id);
assetStore.removeAssets([asset.id]);
break;
}
@ -414,7 +414,7 @@
<slot name="empty" />
{/if}
<section id="virtual-timeline" style:height={$assetStore.timelineHeight + 'px'}>
{#each $assetStore.buckets as bucket, bucketIndex (bucketIndex)}
{#each $assetStore.buckets as bucket (bucket.bucketDate)}
<IntersectionObserver
on:intersected={intersectedHandler}
on:hidden={() => assetStore.cancelBucket(bucket)}