mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(web): delete non-empty album (#12937)
This commit is contained in:
parent
b2f2be3485
commit
ad0dbf0315
1 changed files with 5 additions and 3 deletions
|
@ -169,12 +169,13 @@
|
||||||
|
|
||||||
const handleToggleEnableActivity = async () => {
|
const handleToggleEnableActivity = async () => {
|
||||||
try {
|
try {
|
||||||
album = await updateAlbumInfo({
|
await updateAlbumInfo({
|
||||||
id: album.id,
|
id: album.id,
|
||||||
updateAlbumDto: {
|
updateAlbumDto: {
|
||||||
isActivityEnabled: !album.isActivityEnabled,
|
isActivityEnabled: !album.isActivityEnabled,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
await refreshAlbum();
|
||||||
notificationController.show({
|
notificationController.show({
|
||||||
type: NotificationType.Info,
|
type: NotificationType.Info,
|
||||||
message: $t('activity_changed', { values: { enabled: album.isActivityEnabled } }),
|
message: $t('activity_changed', { values: { enabled: album.isActivityEnabled } }),
|
||||||
|
@ -277,7 +278,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const refreshAlbum = async () => {
|
const refreshAlbum = async () => {
|
||||||
album = await getAlbumInfo({ id: album.id, withoutAssets: true });
|
data.album = await getAlbumInfo({ id: album.id, withoutAssets: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAddAssets = async () => {
|
const handleAddAssets = async () => {
|
||||||
|
@ -330,12 +331,13 @@
|
||||||
|
|
||||||
const handleAddUsers = async (albumUsers: AlbumUserAddDto[]) => {
|
const handleAddUsers = async (albumUsers: AlbumUserAddDto[]) => {
|
||||||
try {
|
try {
|
||||||
album = await addUsersToAlbum({
|
await addUsersToAlbum({
|
||||||
id: album.id,
|
id: album.id,
|
||||||
addUsersDto: {
|
addUsersDto: {
|
||||||
albumUsers,
|
albumUsers,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
await refreshAlbum();
|
||||||
|
|
||||||
viewMode = ViewMode.VIEW;
|
viewMode = ViewMode.VIEW;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue