about summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-14 16:53:47 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-14 16:53:47 -0400
commit07138146a01d802e4d1b5a7d0ccf4601d89eeef8 (patch)
tree7792f3361e349116c8210a9ef377e24f22c3087a /widgets
parentdb213fd0aed98a79ecb1be2c7b7d61c7d983bedf (diff)
downloadaerc-07138146a01d802e4d1b5a7d0ccf4601d89eeef8.tar.gz
Force INBOX to be included in dirlist
Diffstat (limited to 'widgets')
-rw-r--r--widgets/dirlist.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index faf73a1..689eb77 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -47,6 +47,17 @@ func (dirlist *DirectoryList) UpdateList(done func(dirs []string)) {
 			case *types.Directory:
 				dirs = append(dirs, msg.Name)
 			case *types.Done:
+				// There is always an INBOX, RFC-guaranteed
+				// However, for some reason Dovecot doesn't always send it.
+				inbox := false
+				for _, dir := range dirs {
+					if dir == "INBOX" {
+						inbox = true
+					}
+				}
+				if !inbox {
+					dirs = append(dirs, "INBOX")
+				}
 				sort.Strings(dirs)
 				dirlist.dirs = dirs
 				dirlist.spinner.Stop()
01d15a1a6a5a726dbe6b2b88d3f72d5d5e391'>^
1dcd9350 ^
9e5e87ca ^
1dcd9350 ^









c442a5ad ^
1dcd9350 ^

















55b4627d ^
c442a5ad ^
55b4627d ^

c442a5ad ^
1dcd9350 ^
a988da65 ^
1dcd9350 ^
a988da65 ^

9e5e87ca ^
55b4627d ^


b141a448 ^
d02aa9ac ^



1dcd9350 ^
9e5e87ca ^
1dcd9350 ^

1f56ac64 ^
1dcd9350 ^

ef52bbf9 ^




68ccf4d3 ^
6dff1f28 ^



68ccf4d3 ^




3b798ea2 ^
1f56ac64 ^
3b798ea2 ^
b141a448 ^

3b798ea2 ^
b141a448 ^

















ef52bbf9 ^
8188bbbc ^
b141a448 ^

8188bbbc ^
b141a448 ^

8188bbbc ^
b141a448 ^



1f56ac64 ^
b141a448 ^




1f56ac64 ^
b141a448 ^








1bbbf14f ^
1f56ac64 ^
83c67014 ^
1f56ac64 ^






83c67014 ^
a49bc413 ^
1f56ac64 ^
a49bc413 ^
1f56ac64 ^
83c67014 ^
4a99a6e0 ^
1f56ac64 ^



83c67014 ^
1f56ac64 ^
21d8241b ^
1f56ac64 ^
21d8241b ^









dc9a126e ^
1f56ac64 ^
a49bc413 ^

bcf92ad2 ^


1f56ac64 ^


b141a448 ^
262f6ea8 ^
b141a448 ^

3b798ea2 ^
1f56ac64 ^





b20d9ad3 ^
b20d9ad3 ^

a49bc413 ^
1f56ac64 ^




7b686a02 ^
b141a448 ^

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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206