summary refs log tree commit diff stats
path: root/worker
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-02-15 14:14:44 +0100
committerDrew DeVault <sir@cmpwn.com>2020-02-16 10:41:17 -0500
commit89b742dc6c2cc4e70cc7fd44454ee184dcc4b627 (patch)
tree53d9032255e94900df7e1c8d74735b93b4635b39 /worker
parent66b68f35b3f3f3b97ec9951397fd75afeb0d0995 (diff)
downloadaerc-89b742dc6c2cc4e70cc7fd44454ee184dcc4b627.tar.gz
Request DirInfo whenever the unread count may have changed
Actions such as read / unread or the addition of new messages do change
the read/unread/recent count. Hence we request an update from the workers.
Workers going over the network should probably cache the information and invalidate
it only if necessary
Diffstat (limited to 'worker')
-rw-r--r--worker/types/messages.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/worker/types/messages.go b/worker/types/messages.go
index c7d5077..f43ab0a 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -149,6 +149,13 @@ type DirectoryInfo struct {
 	Info *models.DirectoryInfo
 }
 
+// Sent whenever we assume that a directory content changed
+// workers are requested to update the DirectoryInfo to display the unread count
+type DirectoryInfoUpdateRequest struct {
+	Message
+	Name string
+}
+
 type DirectoryContents struct {
 	Message
 	Uids []uint32
6e1b906586c09ef3b4977245692c'>8afe2dd1 ^
b6c5fef4 ^

f21cb52a ^
773255b4 ^
8afe2dd1 ^









f21cb52a ^
279737ba ^

b6c5fef4 ^


b6c5fef4 ^
6bad38c2 ^
8afe2dd1 ^
b6c5fef4 ^



279737ba ^

b6c5fef4 ^
4531aebd ^



b6c5fef4 ^
4531aebd ^
8afe2dd1 ^
4531aebd ^

6bad38c2 ^
8afe2dd1 ^
f21cb52a ^
8afe2dd1 ^
f21cb52a ^
6bad38c2 ^
8afe2dd1 ^
f21cb52a ^
f21cb52a ^
8afe2dd1 ^
4531aebd ^
773255b4 ^
8afe2dd1 ^

773255b4 ^
6bad38c2 ^
f21cb52a ^

f21cb52a ^
8afe2dd1 ^
6bad38c2 ^
8afe2dd1 ^

6bad38c2 ^
8afe2dd1 ^
f21cb52a ^




279737ba ^

b6c5fef4 ^
4531aebd ^
b6c5fef4 ^
1730372e ^
b6c5fef4 ^

4531aebd ^



6bad38c2 ^
8afe2dd1 ^

6bad38c2 ^
8afe2dd1 ^
6b1b035d ^
8afe2dd1 ^
4531aebd ^
8afe2dd1 ^
4531aebd ^
b6c5fef4 ^
8afe2dd1 ^

b6c5fef4 ^

8afe2dd1 ^
b6c5fef4 ^


279737ba ^

b6c5fef4 ^
773255b4 ^
8afe2dd1 ^
1730372e ^
4531aebd ^




b6c5fef4 ^

8afe2dd1 ^

6bad38c2 ^
8afe2dd1 ^



279737ba ^

8afe2dd1 ^


6bad38c2 ^
8afe2dd1 ^
6bad38c2 ^
b6c5fef4 ^

8afe2dd1 ^


279737ba ^

8afe2dd1 ^
6bad38c2 ^
8afe2dd1 ^


279737ba ^

8afe2dd1 ^






279737ba ^

8afe2dd1 ^



279737ba ^

8afe2dd1 ^





279737ba ^

8afe2dd1 ^



279737ba ^

8afe2dd1 ^



279737ba ^

8afe2dd1 ^


6bad38c2 ^
8afe2dd1 ^



279737ba ^

8afe2dd1 ^



279737ba ^

8afe2dd1 ^





279737ba ^

8afe2dd1 ^
6bad38c2 ^
8afe2dd1 ^


6bad38c2 ^

8afe2dd1 ^







279737ba ^

8afe2dd1 ^







b6c5fef4 ^
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267