Fix: ensure batch move correctly switches to the current library view

This commit is contained in:
Tiberiu Ichim 2026-02-22 20:22:00 +02:00
parent 5506026fd4
commit 8f030f2b04

View file

@ -208,10 +208,13 @@ export default {
if (response.failCount > 0) { if (response.failCount > 0) {
this.$toast.warning(this.$getString('ToastItemsMoveFailed', [response.failCount])) this.$toast.warning(this.$getString('ToastItemsMoveFailed', [response.failCount]))
} }
// Store the current library ID before clearing the selected items so we know where to redirect to
const redirectLibraryId = this.currentLibraryId
// Clear selection after batch move // Clear selection after batch move
this.$store.commit('globals/resetSelectedMediaItems') this.$store.commit('globals/resetSelectedMediaItems')
if (response.successCount > 0) { if (response.successCount > 0) {
this.$router.push(`/library/${this.currentLibraryId}`) this.$router.push(`/library/${redirectLibraryId}`)
} }
} else { } else {
// Single item move // Single item move