about summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/messageview.go2
-rw-r--r--lib/msgstore.go9
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/messageview.go b/lib/messageview.go
index 384a947..08ea92f 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 86215a7..dda15d3 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)
 }