summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--widgets/dirlist.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index c000f52..600b38c 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -177,7 +177,10 @@ func (dirlist *DirectoryList) getRUEString(name string) string {
 		totalUnseen = msgStore.DirInfo.Unseen
 		totalExists = msgStore.DirInfo.Exists
 	} else {
-		totalRecent, totalUnseen, totalExists = countRUE(msgStore)
+		totalRecent, totalUnseen = countRUE(msgStore)
+		// use the total count from the dirinfo, else we only count already
+		// fetched messages
+		totalExists = msgStore.DirInfo.Exists
 	}
 	rueString := ""
 	if totalRecent > 0 {
@@ -377,7 +380,7 @@ func (dirlist *DirectoryList) getSortCriteria() []*types.SortCriterion {
 	return criteria
 }
 
-func countRUE(msgStore *lib.MessageStore) (recent, unread, exist int) {
+func countRUE(msgStore *lib.MessageStore) (recent, unread int) {
 	for _, msg := range msgStore.Messages {
 		if msg == nil {
 			continue
@@ -398,7 +401,6 @@ func countRUE(msgStore *lib.MessageStore) (recent, unread, exist int) {
 				unread++
 			}
 		}
-		exist++
 	}
-	return recent, unread, exist
+	return recent, unread
 }
vc@akkartik.com> 2014-11-25 01:25:20 -0800 325 - example program using channels' href='/akkartik/mu/commit/channel.mu?h=hlt&id=f192d6556debd363d2893ca8aab72b147527f15a'>f192d655 ^
b96af395 ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43