Skip to content

High performance self-hosted photo and video management solution.

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

Jason Rasmussenad0dbf031536
diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte
index b11bf9b8aa..3df4a25b83 100644
--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte
+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte
@@ -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) {