Skip to content

Commit 35f1d1d

Browse files
committed
fix: mark envelope as unseen via shortcut
The check, if storing seen/unseen is possible, was mixed up. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent c96ec6e commit 35f1d1d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/components/Mailbox.vue

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,17 +386,23 @@ export default {
386386

387387
break
388388
case 'unseen':
389-
if (this.hasSeenAcl()) {
389+
logger.debug('marking as seen/unseen via shortcut')
390+
391+
if (!this.hasSeenAcl()) {
392+
showWarning(t('mail', 'Your IMAP server does not support storing the seen/unseen state.'))
390393
return
391394
}
392-
logger.debug('marking message as seen/unseen via shortkey', { env })
393-
this.mainStore.toggleEnvelopeSeen({ envelope: env }).catch((error) =>
395+
396+
logger.debug('marking as seen/unseen', { env })
397+
try {
398+
await this.mainStore.toggleEnvelopeSeen({ envelope: env })
399+
} catch (error) {
394400
logger.error('could not mark envelope as seen/unseen via shortkey', {
395401
env,
396402
error,
397-
}),
398-
)
399-
403+
})
404+
showError(t('mail', 'Could not mark message as seen/unseen'))
405+
}
400406
break
401407
default:
402408
logger.warn('shortcut ' + e.srcKey + ' is unknown. ignoring.')

0 commit comments

Comments
 (0)