diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-06-09 14:55:34 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-09 14:55:42 -0400 |
commit | 6271d455eb7d72ca2942e3721721be54fed27779 (patch) | |
tree | f5c37e55333f2fb1807b6a41fc6093838a134adc /lib/msgstore.go | |
parent | 05f00f0153066b9bb527773927a3244dad28ef4f (diff) | |
download | aerc-6271d455eb7d72ca2942e3721721be54fed27779.zip |
Add :read and :unread commands
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r-- | lib/msgstore.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go index 56725e3..5b4d540 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -265,3 +265,17 @@ func (store *MessageStore) Move(uids []uint32, dest string, createDest bool, store.update() } + +func (store *MessageStore) Read(uids []uint32, read bool, + cb func(msg types.WorkerMessage)) { + + var set imap.SeqSet + for _, uid := range uids { + set.AddNum(uid) + } + + store.worker.PostAction(&types.ReadMessages{ + Read: read, + Uids: set, + }, cb) +} |