Fix tThe editor background appears gray when the waning dialog appears
This commit is contained in:
@@ -40,4 +40,8 @@ class PrintEmailAction extends EmailUIAction {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [context, userEmail, email];
|
||||
}
|
||||
}
|
||||
|
||||
class HideEmailContentViewAction extends EmailUIAction {}
|
||||
|
||||
class ShowEmailContentViewAction extends EmailUIAction {}
|
||||
@@ -144,6 +144,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
final emailLoadedViewState = Rx<Either<Failure, Success>>(Right(UIState.idle));
|
||||
final emailUnsubscribe = Rxn<EmailUnsubscribe>();
|
||||
final attachmentsViewState = RxMap<Id, Either<Failure, Success>>();
|
||||
final isEmailContentHidden = RxBool(false);
|
||||
|
||||
EmailId? _currentEmailId;
|
||||
Identity? _identitySelected;
|
||||
@@ -289,6 +290,12 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
} else if (action is CloseEmailDetailedViewAction) {
|
||||
closeEmailView(context: currentContext);
|
||||
mailboxDashBoardController.clearEmailUIAction();
|
||||
} else if (action is HideEmailContentViewAction) {
|
||||
isEmailContentHidden.value = true;
|
||||
mailboxDashBoardController.clearEmailUIAction();
|
||||
} else if (action is ShowEmailContentViewAction) {
|
||||
isEmailContentHidden.value = false;
|
||||
mailboxDashBoardController.clearEmailUIAction();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -427,6 +427,30 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
}),
|
||||
),
|
||||
);
|
||||
} else if (PlatformInfo.isIOS
|
||||
&& !controller.responsiveUtils.isScreenWithShortestSide(context)) {
|
||||
return Obx(() {
|
||||
if (controller.isEmailContentHidden.isTrue) {
|
||||
return const SizedBox.shrink();
|
||||
} else {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.symmetric(
|
||||
vertical: EmailViewStyles.mobileContentVerticalMargin,
|
||||
horizontal: EmailViewStyles.mobileContentHorizontalMargin
|
||||
),
|
||||
child: LayoutBuilder(builder: (context, constraints) {
|
||||
return HtmlContentViewer(
|
||||
contentHtml: allEmailContents,
|
||||
initialWidth: constraints.maxWidth,
|
||||
direction: AppUtils.getCurrentDirection(context),
|
||||
onMailtoDelegateAction: controller.openMailToLink,
|
||||
onScrollHorizontalEnd: controller.toggleScrollPhysicsPagerView,
|
||||
onLoadWidthHtmlViewer: controller.emailSupervisorController.updateScrollPhysicPageView,
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.symmetric(
|
||||
|
||||
+26
-1
@@ -38,6 +38,7 @@ import 'package:tmail_ui_user/features/composer/domain/state/update_email_drafts
|
||||
import 'package:tmail_ui_user/features/composer/domain/usecases/get_autocomplete_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/composer/domain/usecases/send_email_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/composer_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/composer_view.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/extensions/email_action_type_extension.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/extensions/list_identities_extension.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/compose_action_mode.dart';
|
||||
@@ -1411,7 +1412,31 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
} else {
|
||||
BackButtonInterceptor.removeByName(AppRoutes.dashboard);
|
||||
|
||||
final result = await push(AppRoutes.composer, arguments: argumentsWithIdentity);
|
||||
bool isTabletPlatform = currentContext != null
|
||||
&& !responsiveUtils.isScreenWithShortestSide(currentContext!);
|
||||
dynamic result;
|
||||
|
||||
if (isTabletPlatform) {
|
||||
if (PlatformInfo.isIOS) {
|
||||
dispatchEmailUIAction(HideEmailContentViewAction());
|
||||
}
|
||||
|
||||
result = await Get.to(
|
||||
() => const ComposerView(),
|
||||
binding: ComposerBindings(),
|
||||
opaque: false,
|
||||
arguments: argumentsWithIdentity);
|
||||
|
||||
if (PlatformInfo.isIOS) {
|
||||
await Future.delayed(
|
||||
const Duration(milliseconds: 200),
|
||||
() => dispatchEmailUIAction(ShowEmailContentViewAction()));
|
||||
}
|
||||
} else {
|
||||
result = await push(
|
||||
AppRoutes.composer,
|
||||
arguments: argumentsWithIdentity);
|
||||
}
|
||||
|
||||
BackButtonInterceptor.add(_onBackButtonInterceptor, name: AppRoutes.dashboard);
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ class AppPages {
|
||||
...[
|
||||
GetPage(
|
||||
name: AppRoutes.composer,
|
||||
opaque: false,
|
||||
page: () => DeferredWidget(
|
||||
composer.loadLibrary,
|
||||
() => composer.ComposerView()),
|
||||
|
||||
Reference in New Issue
Block a user