Skip to content

Commit

Permalink
TF-2188 Disable sending queue on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 authored and hoangdat committed Oct 6, 2023
1 parent 04af133 commit cec4ccb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ class ComposerController extends BaseController {
? CreateNewMailboxRequest(Id(_uuid.v1()), PresentationMailbox.outboxMailboxName)
: null;

if (PlatformInfo.isMobile && !networkConnectionController.isNetworkConnectionAvailable()) {
if (PlatformInfo.isAndroid && !networkConnectionController.isNetworkConnectionAvailable()) {
switch(arguments.sendingEmailActionType) {
case SendingEmailActionType.create:
_showConfirmDialogStoreSendingEmail(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,23 +366,25 @@ class MailboxDashBoardController extends ReloadableController {
@override
void handleExceptionAction({Failure? failure, Exception? exception}) {
super.handleExceptionAction(failure: failure, exception: exception);
if (PlatformInfo.isMobile &&
failure is SendEmailFailure &&
exception is NoNetworkError) {
if (failure.emailRequest.storedSendingId != null) {
_handleStoreSendingEmail(
failure.session,
failure.accountId,
failure.emailRequest,
failure.mailboxRequest
);
} else {
_handleUpdateSendingEmail(
failure.session,
failure.accountId,
failure.emailRequest,
failure.mailboxRequest
);
if (failure is SendEmailFailure && exception is NoNetworkError) {
if (PlatformInfo.isIOS && currentContext != null) {
_showToastSendMessageFailure(AppLocalizations.of(currentContext!).sendMessageFailure);
} else if (PlatformInfo.isAndroid) {
if (failure.emailRequest.storedSendingId != null) {
_handleStoreSendingEmail(
failure.session,
failure.accountId,
failure.emailRequest,
failure.mailboxRequest
);
} else {
_handleUpdateSendingEmail(
failure.session,
failure.accountId,
failure.emailRequest,
failure.mailboxRequest
);
}
}
}
}
Expand Down

0 comments on commit cec4ccb

Please sign in to comment.