aboutsummaryrefslogtreecommitdiffstats
path: root/lib/messageview.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/messageview.go')
-rw-r--r--lib/messageview.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/messageview.go b/lib/messageview.go
index d774f4f3..e4f9cbeb 100644
--- a/lib/messageview.go
+++ b/lib/messageview.go
@@ -29,6 +29,9 @@ type MessageView interface {
FetchBodyPart(part []int, cb func(io.Reader))
MessageDetails() *models.MessageDetails
+
+ // SeenFlagSet returns true if the "seen" flag has been set
+ SeenFlagSet() bool
}
func usePGP(info *models.BodyStructure) bool {
@@ -56,6 +59,7 @@ type MessageStoreView struct {
message []byte
details *models.MessageDetails
bodyStructure *models.BodyStructure
+ setSeen bool
}
func NewMessageStoreView(messageInfo *models.MessageInfo, setSeen bool,
@@ -65,6 +69,7 @@ func NewMessageStoreView(messageInfo *models.MessageInfo, setSeen bool,
msv := &MessageStoreView{
messageInfo, store,
nil, nil, messageInfo.BodyStructure,
+ setSeen,
}
if usePGP(messageInfo.BodyStructure) {
@@ -102,6 +107,10 @@ func NewMessageStoreView(messageInfo *models.MessageInfo, setSeen bool,
}
}
+func (msv *MessageStoreView) SeenFlagSet() bool {
+ return msv.setSeen
+}
+
func (msv *MessageStoreView) MessageInfo() *models.MessageInfo {
return msv.messageInfo
}