mirror of
https://github.com/immich-app/immich
synced 2025-06-07 20:56:42 +00:00
fix: use single bulkTagAssets call instead of loop (#18672)
This commit is contained in:
parent
93e53f6d74
commit
369d3dfa38
@ -21,6 +21,7 @@ import { navigate } from '$lib/utils/navigation';
|
|||||||
import {
|
import {
|
||||||
addAssetsToAlbum as addAssets,
|
addAssetsToAlbum as addAssets,
|
||||||
AssetVisibility,
|
AssetVisibility,
|
||||||
|
bulkTagAssets,
|
||||||
createStack,
|
createStack,
|
||||||
deleteAssets,
|
deleteAssets,
|
||||||
deleteStacks,
|
deleteStacks,
|
||||||
@ -28,7 +29,6 @@ import {
|
|||||||
getBaseUrl,
|
getBaseUrl,
|
||||||
getDownloadInfo,
|
getDownloadInfo,
|
||||||
getStack,
|
getStack,
|
||||||
tagAssets as tagAllAssets,
|
|
||||||
untagAssets,
|
untagAssets,
|
||||||
updateAsset,
|
updateAsset,
|
||||||
updateAssets,
|
updateAssets,
|
||||||
@ -83,9 +83,7 @@ export const tagAssets = async ({
|
|||||||
tagIds: string[];
|
tagIds: string[];
|
||||||
showNotification?: boolean;
|
showNotification?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
for (const tagId of tagIds) {
|
await bulkTagAssets({ tagBulkAssetsDto: { tagIds, assetIds } });
|
||||||
await tagAllAssets({ id: tagId, bulkIdsDto: { ids: assetIds } });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showNotification) {
|
if (showNotification) {
|
||||||
const $t = await getFormatter();
|
const $t = await getFormatter();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user