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, 4 insertions, 8 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index ca0f6c19..99ffe194 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -522,21 +522,17 @@ func countRUE(msgStore *lib.MessageStore) (recent, unread int) {
continue
}
seen := false
- isrecent := false
for _, flag := range msg.Flags {
if flag == models.SeenFlag {
seen = true
- } else if flag == models.RecentFlag {
- isrecent = true
}
- }
- if !seen {
- if isrecent {
+ if flag == models.RecentFlag {
recent++
- } else {
- unread++
}
}
+ if !seen {
+ unread++
+ }
}
return recent, unread
}