mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): suppress album upload notification (#10717)
* fix(web): suppress album upload notification * restore translation strings
This commit is contained in:
parent
ac51cad075
commit
4193b0dede
2 changed files with 18 additions and 15 deletions
|
|
@ -28,7 +28,7 @@ import { t } from 'svelte-i18n';
|
|||
import { get } from 'svelte/store';
|
||||
import { handleError } from './handle-error';
|
||||
|
||||
export const addAssetsToAlbum = async (albumId: string, assetIds: string[]) => {
|
||||
export const addAssetsToAlbum = async (albumId: string, assetIds: string[], showNotification = true) => {
|
||||
const result = await addAssets({
|
||||
id: albumId,
|
||||
bulkIdsDto: {
|
||||
|
|
@ -38,6 +38,8 @@ export const addAssetsToAlbum = async (albumId: string, assetIds: string[]) => {
|
|||
});
|
||||
const count = result.filter(({ success }) => success).length;
|
||||
const $t = get(t);
|
||||
|
||||
if (showNotification) {
|
||||
notificationController.show({
|
||||
type: NotificationType.Info,
|
||||
timeout: 5000,
|
||||
|
|
@ -52,6 +54,7 @@ export const addAssetsToAlbum = async (albumId: string, assetIds: string[]) => {
|
|||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const addAssetsToNewAlbum = async (albumName: string, assetIds: string[]) => {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ async function fileUploader(assetFile: File, albumId?: string, replaceAssetId?:
|
|||
|
||||
if (albumId) {
|
||||
uploadAssetsStore.updateAsset(deviceAssetId, { message: $t('asset_adding_to_album') });
|
||||
await addAssetsToAlbum(albumId, [responseData.id]);
|
||||
await addAssetsToAlbum(albumId, [responseData.id], false);
|
||||
uploadAssetsStore.updateAsset(deviceAssetId, { message: $t('asset_added_to_album') });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue