Skip to content

Commit

Permalink
Merge pull request #475 from Infomaniak/thread-date
Browse files Browse the repository at this point in the history
fix: Thread date
  • Loading branch information
PhilippeWeidmann authored Jan 6, 2023
2 parents adf6276 + f250c22 commit 63cdbbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MailCore/Models/Thread.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public class Thread: Object, Decodable, Identifiable {
messageIds = messages.flatMap { $0.linkedUids }.toRealmSet()
updateUnseenMessages()
from = messages.flatMap { $0.from.detached() }.toRealmList()
date = messages.last?.date ?? date
date = messages.last { $0.folderId == folderId }?.date ?? date
size = messages.sum(of: \.size)
hasAttachments = messages.contains { $0.hasAttachments }
hasDrafts = messages.map { $0.isDraft }.contains(true)
Expand Down

0 comments on commit 63cdbbf

Please sign in to comment.