1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

ui: Mark messages as seen after 1.5s for #58

Embolden subject font for unseen messages.
This commit is contained in:
James Hillyerd
2018-04-01 15:16:48 -07:00
parent dc02092cf6
commit c695a2690d
5 changed files with 45 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/jhillyerd/inbucket/pkg/policy"
"github.com/jhillyerd/inbucket/pkg/storage"
"github.com/jhillyerd/inbucket/pkg/stringutil"
"github.com/rs/zerolog/log"
)
// Manager is the interface controllers use to interact with messages.
@@ -127,6 +128,8 @@ func (s *StoreManager) GetMessage(mailbox, id string) (*Message, error) {
// MarkSeen marks the message as having been read.
func (s *StoreManager) MarkSeen(mailbox, id string) error {
log.Debug().Str("module", "manager").Str("mailbox", mailbox).Str("id", id).
Msg("Marking as seen")
return s.Store.MarkSeen(mailbox, id)
}
@@ -164,5 +167,6 @@ func makeMetadata(m storage.Message) *Metadata {
Date: m.Date(),
Subject: m.Subject(),
Size: m.Size(),
Seen: m.Seen(),
}
}