TF-4265 Add integration test for attachment reminder on mobile

This commit is contained in:
dab246
2026-01-30 16:09:38 +07:00
committed by Dat H. Pham
parent 74c0c75023
commit 2a3325ab7a
17 changed files with 781 additions and 899 deletions
@@ -883,6 +883,22 @@ class ComposerController extends BaseController
final emailContent = await getContentInEditor();
if (uploadController.attachmentsUploaded.isNotEmpty) {
if (!context.mounted) {
logWarning('ComposerController::_prepareToSendMessages: CONTEXT IS NOT MOUNTED');
_sendButtonState = ButtonState.enabled;
return;
}
_sendMessageToServer(
context: context,
session: session,
accountId: accountId,
arguments: arguments,
emailContent: emailContent,
);
return;
}
final attachmentKeywords = await validateAttachmentReminder(
emailSubject: subjectEmail.value ?? '',
emailContent: emailContent,
@@ -894,8 +910,7 @@ class ComposerController extends BaseController
return;
}
if (attachmentKeywords.isNotEmpty &&
uploadController.attachmentsUploaded.isEmpty) {
if (attachmentKeywords.isNotEmpty) {
showAttachmentReminderModal(
context: context,
keywords: attachmentKeywords,