This commit is contained in:
aozhiwei 2024-04-22 09:03:23 +08:00
parent 5d40750280
commit 168b1c410e
2 changed files with 9 additions and 2 deletions

View File

@ -6,5 +6,6 @@ type inbox struct {
var Inbox = new(inbox)
func (this *inbox) Mark(accountId string, mailId int64) {
func (this *inbox) Mark(accountId string, mailId int64, nowTime int64) error {
return nil
}

View File

@ -46,11 +46,17 @@ func (this *player) GetAccountId() string {
func (this *player) MarkMails(mails []common.Mail) error {
this.checkLock()
var resultErr error
var nowTime int64
for _, m := range(mails) {
if m.IsValid(this) {
mi := this.getInbox(m.GetMailId())
if mi == nil {
model.Inbox.Mark(this.GetAccountId(), m.GetMailId())
err := model.Inbox.Mark(this.GetAccountId(), m.GetMailId(), nowTime)
if err != nil {
resultErr = err
break
}
}
}
if resultErr != nil {