aboutsummaryrefslogtreecommitdiffstats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-01-23 21:04:54 +0100
committerMoritz Poldrack <git@moritz.sh>2023-01-24 19:55:29 +0100
commit3000c8262f69e2b04266be6ee08f1f5cb7c3f473 (patch)
treee5a4a1b19e6d4ce14e453282c36e9b7fe217a789 /lib/msgstore.go
parent276c30f84d748ca639acbf5f85a37eca2425c2b3 (diff)
downloadaerc-3000c8262f69e2b04266be6ee08f1f5cb7c3f473.tar.gz
msgstore: fix new-email trigger firing for all unread messages
Unfortunate typo. Fixes: 5677f93ff8e0 ("model: change flags array to bitmask") Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Ben Cohen <ben@bencohen.net>
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index d2851db2..38fa82e6 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -269,8 +269,8 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
store.Unlock()
store.fetchFlags()
}
- seen := msg.Info.Flags.Has(models.RecentFlag)
- recent := msg.Info.Flags.Has(models.SeenFlag)
+ seen := msg.Info.Flags.Has(models.SeenFlag)
+ recent := msg.Info.Flags.Has(models.RecentFlag)
if !seen && recent {
store.triggerNewEmail(msg.Info)
}