TF-3294 Handle open email in Sent mailbox
This commit is contained in:
+3
-2
@@ -2,8 +2,9 @@ import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
import 'package:tmail_ui_user/features/thread_detail/domain/model/email_in_thread_detail_info.dart';
|
||||
|
||||
extension ListEmailInThreadDetailInfoExtension on List<EmailInThreadDetailInfo> {
|
||||
List<EmailId> get emailIdsToDisplay =>
|
||||
where((email) => email.isValidToDisplay)
|
||||
List<EmailId> emailIdsToDisplay(bool isSentMailbox) => isSentMailbox
|
||||
? map((email) => email.emailId).toList()
|
||||
: where((email) => email.isValidToDisplay)
|
||||
.map((email) => email.emailId)
|
||||
.toList();
|
||||
}
|
||||
@@ -21,6 +21,7 @@ class GetThreadByIdInteractor {
|
||||
AccountId accountId,
|
||||
MailboxId sentMailboxId,
|
||||
String ownEmailAddress, {
|
||||
required bool isSentMailbox,
|
||||
bool updateCurrentThreadDetail = false,
|
||||
}) async* {
|
||||
try {
|
||||
@@ -36,7 +37,7 @@ class GetThreadByIdInteractor {
|
||||
);
|
||||
|
||||
yield Right(GetThreadByIdSuccess(
|
||||
result.emailIdsToDisplay,
|
||||
result.emailIdsToDisplay(isSentMailbox),
|
||||
threadId: threadId,
|
||||
updateCurrentThreadDetail: updateCurrentThreadDetail,
|
||||
emailsInThreadDetailInfo: result,
|
||||
@@ -51,6 +52,8 @@ class GetThreadByIdInteractor {
|
||||
accountId,
|
||||
sentMailboxId,
|
||||
ownEmailAddress,
|
||||
isSentMailbox: isSentMailbox,
|
||||
updateCurrentThreadDetail: updateCurrentThreadDetail,
|
||||
),
|
||||
updateCurrentThreadDetail: updateCurrentThreadDetail,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user