Skip to content

Commit

Permalink
feat: mark junk mail automatically as read and unimportant
Browse files Browse the repository at this point in the history
Signed-off-by: Peter-J. G. <peter.germelmann@gmail.com>
  • Loading branch information
germelmann committed Jul 9, 2024
1 parent d1b19ff commit d9c20c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,14 @@ export default {
async onToggleJunk() {
const removeEnvelope = await this.$store.dispatch('moveEnvelopeToJunk', this.data)

if (this.isImportant) {
await this.$store.dispatch('toggleEnvelopeImportant', this.data)
}

if (!this.data.flags.seen) {
await this.$store.dispatch('toggleEnvelopeSeen', { envelope: this.data })
}

/**
* moveEnvelopeToJunk returns true if the envelope should be moved to a different mailbox.
*
Expand Down

0 comments on commit d9c20c5

Please sign in to comment.