diff --git a/src/components/SelectionManager.vue b/src/components/SelectionManager.vue index 7d3fc0d3..99e634d9 100644 --- a/src/components/SelectionManager.vue +++ b/src/components/SelectionManager.vue @@ -153,7 +153,7 @@ export default class SelectionManager extends Mixins(GlobalMixin, UserConfig) { { name: t("memories", "Remove from album"), icon: AlbumRemoveIcon, - callback: this.removeFromAlbum.bind(this), + callback: this.deleteSelection.bind(this), if: () => this.routeIsAlbum(), }, { @@ -795,35 +795,6 @@ export default class SelectionManager extends Mixins(GlobalMixin, UserConfig) { (this.$refs.addToAlbumModal).open(Array.from(selection.values())); } - /** - * Remove selected photos from album - */ - private async removeFromAlbum(selection: Selection) { - try { - this.updateLoading(1); - const user = this.$route.params.user; - const name = this.$route.params.name; - const gen = dav.removeFromAlbum( - user, - name, - Array.from(selection.values()) - ); - for await (const delIds of gen) { - const delPhotos = delIds - .filter((p) => p) - .map((id) => selection.get(id)); - this.deletePhotos(delPhotos); - } - } catch (e) { - console.error(e); - showError( - e?.message || this.t("memories", "Could not remove photos from album") - ); - } finally { - this.updateLoading(-1); - } - } - /** * Move selected photos to another person */ diff --git a/src/components/viewer/Viewer.vue b/src/components/viewer/Viewer.vue index 6d734658..1f6ae9e1 100644 --- a/src/components/viewer/Viewer.vue +++ b/src/components/viewer/Viewer.vue @@ -36,7 +36,7 @@ + + {{ t("memories", "Remove from album") }} + +