TF-3912 Thread Detail Fix real time update

This commit is contained in:
DatDang
2025-07-29 16:43:03 +07:00
committed by Dat H. Pham
parent 4f0c783ea7
commit c7f5dc9e5e
12 changed files with 262 additions and 7 deletions
@@ -104,11 +104,14 @@ extension HandleRefreshThreadDetailAction on ThreadDetailController {
Email email,
ThreadId currentThreadId,
) {
return email.threadId == currentThreadId &&
sentMailboxId != null &&
!email.inSentMailbox(sentMailboxId!) &&
ownEmailAddress != null &&
!email.fromMe(ownEmailAddress!) &&
!email.recipientsHasMe(ownEmailAddress!);
if (email.threadId != currentThreadId) return false;
if (sentMailboxId != null && !email.inSentMailbox(sentMailboxId!)) {
return true;
}
return ownEmailAddress != null &&
(!email.fromMe(ownEmailAddress!) ||
!email.recipientsHasMe(ownEmailAddress!));
}
}