Unseen is first sequence number of unseen message not count of messages

This commit is contained in:
Michal Horejsek
2020-04-06 10:54:14 +02:00
parent ea0f3115a3
commit c939893131
11 changed files with 33 additions and 23 deletions

View File

@ -376,7 +376,7 @@ func (storeMailbox *Mailbox) txDeleteMessage(tx *bolt.Tx, apiID string) error {
}
func (storeMailbox *Mailbox) txMailboxStatusUpdate(tx *bolt.Tx) error {
total, unread, err := storeMailbox.txGetCounts(tx)
total, unread, unreadSeqNum, err := storeMailbox.txGetCounts(tx)
if err != nil {
return errors.Wrap(err, "cannot get counts for mailbox status update")
}
@ -385,6 +385,7 @@ func (storeMailbox *Mailbox) txMailboxStatusUpdate(tx *bolt.Tx) error {
storeMailbox.labelName,
total,
unread,
unreadSeqNum,
)
return nil
}