aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r--widgets/dirlist.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 4d27def2..09a1155a 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -497,16 +497,10 @@ func countRUE(msgStore *lib.MessageStore) (recent, unread int) {
if msg == nil {
continue
}
- seen := false
- for _, flag := range msg.Flags {
- if flag == models.SeenFlag {
- seen = true
- }
- if flag == models.RecentFlag {
- recent++
- }
+ if msg.Flags.Has(models.RecentFlag) {
+ recent++
}
- if !seen {
+ if !msg.Flags.Has(models.SeenFlag) {
unread++
}
}