From d0cb911a6cfa2c893740ead8f1937f51f3433ff9 Mon Sep 17 00:00:00 2001 From: RobinAngele Date: Thu, 7 May 2026 11:07:44 +0200 Subject: [PATCH] fix: correct favorite/unfavorite bulk action logic The unfavorite button called favoriteAll() and vice versa, with favFlags computed via negated 'isAtLeastOneSelected*' checks. When all selected messages shared the same state, the flag was inverted, causing a no-op or the wrong action. Replace with explicit favFlag: true/false and correctly named methods. Fixes #12149 Signed-off-by: RobinAngele --- src/components/EnvelopeList.vue | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/EnvelopeList.vue b/src/components/EnvelopeList.vue index 27e3573b61..e4d7165d80 100644 --- a/src/components/EnvelopeList.vue +++ b/src/components/EnvelopeList.vue @@ -43,7 +43,7 @@ v-if="isAtLeastOneSelectedFavorite" variant="tertiary" :title="n('mail', 'Unfavorite {number}', 'Unfavorite {number}', selection.length, { number: selection.length })" - @click.prevent="favoriteAll"> + @click.prevent="unfavoriteAll"> @@ -51,7 +51,7 @@ v-if="isAtLeastOneSelectedUnFavorite" variant="tertiary" :title="n('mail', 'Favorite {number}', 'Favorite {number}', selection.length, { number: selection.length })" - @click.prevent="unFavoriteAll"> + @click.prevent="favoriteAll"> @@ -454,23 +454,21 @@ export default { this.unselectAll() }, - favoriteAll() { - const favFlag = !this.isAtLeastOneSelectedUnFavorite + unfavoriteAll() { this.selectedEnvelopes.forEach((envelope) => { this.mainStore.markEnvelopeFavoriteOrUnfavorite({ envelope, - favFlag, + favFlag: false, }) }) this.unselectAll() }, - unFavoriteAll() { - const favFlag = !this.isAtLeastOneSelectedFavorite + favoriteAll() { this.selectedEnvelopes.forEach((envelope) => { this.mainStore.markEnvelopeFavoriteOrUnfavorite({ envelope, - favFlag, + favFlag: true, }) }) this.unselectAll()