diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/messageview.go | 2 | ||||
-rw-r--r-- | lib/msgstore.go | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/messageview.go b/lib/messageview.go index 384a9472..08ea92fb 100644 --- a/lib/messageview.go +++ b/lib/messageview.go @@ -94,7 +94,7 @@ func NewMessageStoreView(messageInfo *models.MessageInfo, } else { cb(msv, nil) } - store.Read([]uint32{messageInfo.Uid}, true, nil) + store.Flag([]uint32{messageInfo.Uid}, models.SeenFlag, true, nil) } func (msv *MessageStoreView) MessageInfo() *models.MessageInfo { diff --git a/lib/msgstore.go b/lib/msgstore.go index 86215a72..dda15d3b 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -333,11 +333,12 @@ 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)) { +func (store *MessageStore) Flag(uids []uint32, flag models.Flag, + enable bool, cb func(msg types.WorkerMessage)) { - store.worker.PostAction(&types.ReadMessages{ - Read: read, + store.worker.PostAction(&types.FlagMessages{ + Enable: enable, + Flag: flag, Uids: uids, }, cb) } |