TF-2188 Disable sending queue on iOS

(cherry picked from commit cec4ccba1a4e4667db008796bbf89a166d3b333f)
This commit is contained in:
dab246
2023-10-05 16:00:52 +07:00
committed by Dat H. Pham
parent 928bc6cd78
commit 058f28b402
2 changed files with 20 additions and 18 deletions
@@ -874,7 +874,7 @@ class ComposerController extends BaseController {
? CreateNewMailboxRequest(Id(_uuid.v1()), PresentationMailbox.outboxMailboxName) ? CreateNewMailboxRequest(Id(_uuid.v1()), PresentationMailbox.outboxMailboxName)
: null; : null;
if (PlatformInfo.isMobile && !networkConnectionController.isNetworkConnectionAvailable()) { if (PlatformInfo.isAndroid && !networkConnectionController.isNetworkConnectionAvailable()) {
switch(arguments.sendingEmailActionType) { switch(arguments.sendingEmailActionType) {
case SendingEmailActionType.create: case SendingEmailActionType.create:
_showConfirmDialogStoreSendingEmail( _showConfirmDialogStoreSendingEmail(
@@ -366,9 +366,10 @@ class MailboxDashBoardController extends ReloadableController {
@override @override
void handleExceptionAction({Failure? failure, Exception? exception}) { void handleExceptionAction({Failure? failure, Exception? exception}) {
super.handleExceptionAction(failure: failure, exception: exception); super.handleExceptionAction(failure: failure, exception: exception);
if (PlatformInfo.isMobile && if (failure is SendEmailFailure && exception is NoNetworkError) {
failure is SendEmailFailure && if (PlatformInfo.isIOS && currentContext != null) {
exception is NoNetworkError) { _showToastSendMessageFailure(AppLocalizations.of(currentContext!).sendMessageFailure);
} else if (PlatformInfo.isAndroid) {
if (failure.emailRequest.storedSendingId != null) { if (failure.emailRequest.storedSendingId != null) {
_handleStoreSendingEmail( _handleStoreSendingEmail(
failure.session, failure.session,
@@ -386,6 +387,7 @@ class MailboxDashBoardController extends ReloadableController {
} }
} }
} }
}
void _registerPendingEmailAddress() { void _registerPendingEmailAddress() {
_emailAddressStreamSubscription = _emailAddressStreamSubscription =