~rjarry/aerc

3000c8262f69e2b04266be6ee08f1f5cb7c3f473 — Robin Jarry 16 days ago 276c30f
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>
1 files changed, 2 insertions(+), 2 deletions(-)

M lib/msgstore.go
M lib/msgstore.go => lib/msgstore.go +2 -2
@@ 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)
		}