1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(web): delete non-empty album (#12937)

This commit is contained in:
Jason Rasmussen 2024-09-25 16:54:42 -04:00 committed by GitHub
parent b2f2be3485
commit ad0dbf0315
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,12 +169,13 @@
const handleToggleEnableActivity = async () => {
try {
album = await updateAlbumInfo({
await updateAlbumInfo({
id: album.id,
updateAlbumDto: {
isActivityEnabled: !album.isActivityEnabled,
},
});
await refreshAlbum();
notificationController.show({
type: NotificationType.Info,
message: $t('activity_changed', { values: { enabled: album.isActivityEnabled } }),
@ -277,7 +278,7 @@
};
const refreshAlbum = async () => {
album = await getAlbumInfo({ id: album.id, withoutAssets: true });
data.album = await getAlbumInfo({ id: album.id, withoutAssets: true });
};
const handleAddAssets = async () => {
@ -330,12 +331,13 @@
const handleAddUsers = async (albumUsers: AlbumUserAddDto[]) => {
try {
album = await addUsersToAlbum({
await addUsersToAlbum({
id: album.id,
addUsersDto: {
albumUsers,
},
});
await refreshAlbum();
viewMode = ViewMode.VIEW;
} catch (error) {