aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/flags.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-12-21 11:31:04 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-04 22:57:31 +0100
commit5677f93ff8e0f212be112a110fcfe09663c84f98 (patch)
tree9f47f430b312d1f0dc1acdd3735cfd76ad21e0f0 /worker/imap/flags.go
parent36fded03e762da97edde61559c8bf60d5749d6a2 (diff)
downloadaerc-5677f93ff8e0f212be112a110fcfe09663c84f98.tar.gz
model: change flags array to bitmask
Using a list of integers is not optimal. Use a bit mask instead. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'worker/imap/flags.go')
-rw-r--r--worker/imap/flags.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/worker/imap/flags.go b/worker/imap/flags.go
index 9d9ecc86..180bc261 100644
--- a/worker/imap/flags.go
+++ b/worker/imap/flags.go
@@ -34,7 +34,6 @@ func (imapw *IMAPWorker) handleAnsweredMessages(msg *types.AnsweredMessages) {
flags := []interface{}{imap.AnsweredFlag}
if !msg.Answered {
item = imap.FormatFlagsOp(imap.RemoveFlags, false)
- flags = []interface{}{imap.AnsweredFlag}
}
imapw.handleStoreOps(msg, msg.Uids, item, flags,
func(_msg *imap.Message) error {
@@ -50,7 +49,7 @@ func (imapw *IMAPWorker) handleAnsweredMessages(msg *types.AnsweredMessages) {
}
func (imapw *IMAPWorker) handleFlagMessages(msg *types.FlagMessages) {
- flags := []interface{}{flagToImap[msg.Flag]}
+ flags := []interface{}{flagToImap[msg.Flags]}
item := imap.FormatFlagsOp(imap.AddFlags, false)
if !msg.Enable {
item = imap.FormatFlagsOp(imap.RemoveFlags, false)