summary refs log tree commit diff stats
path: root/worker/notmuch
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-09-27 19:00:58 +0200
committerReto Brunner <reto@labrat.space>2020-09-27 19:00:58 +0200
commitc48f228fa5ac57984af78e19713929224874aa8b (patch)
tree05f2164bea0a12effb9ac0a3594bd4340d67cf07 /worker/notmuch
parentdadc9bf2b3e992851d2539d6f459a4f29001e686 (diff)
downloadaerc-c48f228fa5ac57984af78e19713929224874aa8b.tar.gz
notmuch: rename method to SetFlag
Diffstat (limited to 'worker/notmuch')
-rw-r--r--worker/notmuch/message.go8
-rw-r--r--worker/notmuch/worker.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/worker/notmuch/message.go b/worker/notmuch/message.go
index 3d3ed0c..82d00f3 100644
--- a/worker/notmuch/message.go
+++ b/worker/notmuch/message.go
@@ -64,9 +64,9 @@ func (m *Message) NewBodyPartReader(requestedParts []int) (io.Reader, error) {
 	return lib.FetchEntityPartReader(msg, requestedParts)
 }
 
-// SetOneFlag adds or removes a single flag from the message.
+// SetFlag adds or removes a flag from the message.
 // Notmuch doesn't support all the flags, and for those this errors.
-func (m *Message) SetOneFlag(flag models.Flag, enable bool) error {
+func (m *Message) SetFlag(flag models.Flag, enable bool) error {
 	// Translate the flag into a notmuch tag, ignoring no-op flags.
 	var tag string
 	switch flag {
@@ -120,12 +120,12 @@ func (m *Message) SetOneFlag(flag models.Flag, enable bool) error {
 
 // MarkAnswered either adds or removes the "replied" tag from the message.
 func (m *Message) MarkAnswered(answered bool) error {
-	return m.SetOneFlag(models.AnsweredFlag, answered)
+	return m.SetFlag(models.AnsweredFlag, answered)
 }
 
 // MarkRead either adds or removes the maildir.FlagSeen flag from the message.
 func (m *Message) MarkRead(seen bool) error {
-	return m.SetOneFlag(models.SeenFlag, seen)
+	return m.SetFlag(models.SeenFlag, seen)
 }
 
 // tags returns the notmuch tags of a message
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go
index 66d1cd2..67888ff 100644
--- a/worker/notmuch/worker.go
+++ b/worker/notmuch/worker.go
@@ -402,7 +402,7 @@ func (w *worker) handleFlagMessages(msg *types.FlagMessages) error {
 			w.err(msg, err)
 			continue
 		}
-		if err := m.SetOneFlag(msg.Flag, msg.Enable); err != nil {
+		if err := m.SetFlag(msg.Flag, msg.Enable); err != nil {
 			w.w.Logger.Printf("could not set flag %v as %v for message: %v", msg.Flag, msg.Enable, err)
 			w.err(msg, err)
 			continue
commands/account/reply.go?h=0.6.0&id=2b3e123cb86f9b4c5853e31d9e76c2b0d083f90a'>^
2a09617 ^

475b697 ^
2a09617 ^


6838c23 ^
217e885 ^
2a09617 ^

6838c23 ^
2a09617 ^
475b697 ^

6838c23 ^
3ba69ed ^
8be59ca ^


f5a4d93 ^
3ba69ed ^
475b697 ^
8be59ca ^


3ba69ed ^
8be59ca ^






3ba69ed ^

8be59ca ^

475b697 ^
753adb9 ^

3ba69ed ^
753adb9 ^


ce0d0e8 ^
24f1c57 ^
2a186cf ^


24f1c57 ^





6a1c0f6 ^
720733b ^
753adb9 ^
8bb115d ^


217e85a ^



475b697 ^
720733b ^

















475b697 ^
fc9ccc3 ^

475b697 ^
6a1c0f6 ^
720733b ^
6a1c0f6 ^
720733b ^





6a1c0f6 ^
720733b ^






fc9ccc3 ^
720733b ^


8f2e505 ^
720733b ^
8f2e505 ^
720733b ^






ce0d0e8 ^
720733b ^
ce0d0e8 ^
720733b ^
475b697 ^

7f97e0b ^
282dc44 ^
217e885 ^
7f97e0b ^
217e885 ^
7f97e0b ^
475b697 ^
20ec2c8 ^





7b12f2d ^



3ad3a5e ^
20ec2c8 ^

3ad3a5e ^

67fb093 ^
3ba69ed ^
7f03327 ^
20ec2c8 ^
3ba69ed ^
caad1b2 ^
3ba69ed ^





475b697 ^
8be59ca ^
67fb093 ^
8be59ca ^






3ba69ed ^
b1eb7ad ^
8bf100f ^


b1eb7ad ^

3ba69ed ^
8be59ca ^
475b697 ^
217e885 ^
3ba69ed ^

217e885 ^

c574a83 ^
cff4476 ^
c574a83 ^



cff4476 ^

3ba69ed ^
9096049 ^
bf28e23 ^
d238272 ^










8be59ca ^

3ba69ed ^
8be59ca ^
3ba69ed ^
8be59ca ^
475b697 ^
720733b ^







fc9ccc3 ^
720733b ^


fc9ccc3 ^
720733b ^




fc9ccc3 ^
720733b ^


7b12f2d ^























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
268
269
270
271
272
273
274
275
276
277