Refresh change mailbox after update mailbox visibility
This commit is contained in:
@@ -1162,6 +1162,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
|||||||
emailSupervisorController.backToPreviousEmail();
|
emailSupervisorController.backToPreviousEmail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> backButtonPressedCallbackAction(BuildContext context) async {
|
Future<bool> backButtonPressedCallbackAction(BuildContext context) async {
|
||||||
if (!BuildUtils.isWeb) {
|
if (!BuildUtils.isWeb) {
|
||||||
closeEmailView(context);
|
closeEmailView(context);
|
||||||
|
|||||||
+5
-2
@@ -1268,11 +1268,14 @@ class MailboxDashBoardController extends ReloadableController {
|
|||||||
if (isDrawerOpen) {
|
if (isDrawerOpen) {
|
||||||
closeMailboxMenuDrawer();
|
closeMailboxMenuDrawer();
|
||||||
}
|
}
|
||||||
final result = await push(AppRoutes.settings,
|
final result = await push(
|
||||||
arguments: ManageAccountArguments(sessionCurrent));
|
AppRoutes.settings,
|
||||||
|
arguments: ManageAccountArguments(sessionCurrent)
|
||||||
|
);
|
||||||
|
|
||||||
if (result is VacationResponse) {
|
if (result is VacationResponse) {
|
||||||
vacationResponse.value = result;
|
vacationResponse.value = result;
|
||||||
|
dispatchMailboxUIAction(RefreshChangeMailboxAction(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -294,4 +294,11 @@ class ManageAccountDashBoardController extends ReloadableController {
|
|||||||
dashboardSettingAction.value = newAction;
|
dashboardSettingAction.value = newAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> backButtonPressedCallbackAction(BuildContext context) async {
|
||||||
|
if (!BuildUtils.isWeb) {
|
||||||
|
backToMailboxDashBoard(context);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -34,90 +34,93 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return WillPopScope(
|
||||||
backgroundColor: Colors.white,
|
onWillPop: () => controller.backButtonPressedCallbackAction.call(context),
|
||||||
drawerEnableOpenDragGesture: false,
|
child: Scaffold(
|
||||||
body: GestureDetector(
|
backgroundColor: Colors.white,
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
drawerEnableOpenDragGesture: false,
|
||||||
child: ResponsiveWidget(
|
body: GestureDetector(
|
||||||
responsiveUtils: _responsiveUtils,
|
onTap: () => FocusScope.of(context).unfocus(),
|
||||||
desktop: Column(children: [
|
child: ResponsiveWidget(
|
||||||
Row(children: [
|
responsiveUtils: _responsiveUtils,
|
||||||
Container(width: 256, color: Colors.white,
|
desktop: Column(children: [
|
||||||
padding: const EdgeInsets.only(top: 25, bottom: 25, left: 32),
|
Row(children: [
|
||||||
child: Row(children: [
|
Container(width: 256, color: Colors.white,
|
||||||
(SloganBuilder(arrangedByHorizontal: true)
|
padding: const EdgeInsets.only(top: 25, bottom: 25, left: 32),
|
||||||
..setSloganText(AppLocalizations.of(context).app_name)
|
child: Row(children: [
|
||||||
..setSloganTextAlign(TextAlign.center)
|
(SloganBuilder(arrangedByHorizontal: true)
|
||||||
..setSloganTextStyle(const TextStyle(color: Colors.black, fontSize: 20, fontWeight: FontWeight.bold))
|
..setSloganText(AppLocalizations.of(context).app_name)
|
||||||
..setSizeLogo(24)
|
..setSloganTextAlign(TextAlign.center)
|
||||||
..addOnTapCallback(() => controller.backToMailboxDashBoard(context))
|
..setSloganTextStyle(const TextStyle(color: Colors.black, fontSize: 20, fontWeight: FontWeight.bold))
|
||||||
..setLogo(_imagePaths.icLogoTMail))
|
..setSizeLogo(24)
|
||||||
.build(),
|
..addOnTapCallback(() => controller.backToMailboxDashBoard(context))
|
||||||
Obx(() {
|
..setLogo(_imagePaths.icLogoTMail))
|
||||||
if (controller.appInformation.value != null) {
|
.build(),
|
||||||
return Padding(padding: const EdgeInsets.only(top: 6),
|
Obx(() {
|
||||||
child: Text(
|
if (controller.appInformation.value != null) {
|
||||||
'v.${controller.appInformation.value!.version}',
|
return Padding(padding: const EdgeInsets.only(top: 6),
|
||||||
textAlign: TextAlign.center,
|
child: Text(
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail, fontWeight: FontWeight.w500),
|
'v.${controller.appInformation.value!.version}',
|
||||||
));
|
textAlign: TextAlign.center,
|
||||||
} else {
|
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail, fontWeight: FontWeight.w500),
|
||||||
return const SizedBox.shrink();
|
));
|
||||||
}
|
} else {
|
||||||
}),
|
return const SizedBox.shrink();
|
||||||
])
|
}
|
||||||
),
|
}),
|
||||||
Expanded(child: Padding(
|
])
|
||||||
padding: const EdgeInsets.only(right: 10, top: 16, bottom: 10, left: 48),
|
),
|
||||||
child: _buildRightHeader(context)))
|
Expanded(child: Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 10, top: 16, bottom: 10, left: 48),
|
||||||
|
child: _buildRightHeader(context)))
|
||||||
|
]),
|
||||||
|
Expanded(child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(child: ManageAccountMenuView(), width: ResponsiveUtils.defaultSizeMenu),
|
||||||
|
Expanded(child: Container(
|
||||||
|
color: AppColor.colorBgDesktop,
|
||||||
|
child: Column(children: [
|
||||||
|
Obx(() {
|
||||||
|
if (controller.vacationResponse.value?.vacationResponderIsValid == true) {
|
||||||
|
return VacationNotificationMessageWidget(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
top: 16,
|
||||||
|
left: BuildUtils.isWeb ? 24 : 16,
|
||||||
|
right: BuildUtils.isWeb ? 24 : 16),
|
||||||
|
fromAccountDashBoard: true,
|
||||||
|
vacationResponse: controller.vacationResponse.value!,
|
||||||
|
actionGotoVacationSetting: !controller.inVacationSettings()
|
||||||
|
? () => controller.selectAccountMenuItem(AccountMenuItem.vacation)
|
||||||
|
: null,
|
||||||
|
actionEndNow: () => controller.disableVacationResponder());
|
||||||
|
} else if ((controller.vacationResponse.value?.vacationResponderIsWaiting == true
|
||||||
|
|| controller.vacationResponse.value?.vacationResponderIsStopped == true)
|
||||||
|
&& controller.accountMenuItemSelected.value == AccountMenuItem.vacation) {
|
||||||
|
return VacationNotificationMessageWidget(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
top: 16,
|
||||||
|
left: BuildUtils.isWeb ? 24 : 16,
|
||||||
|
right: BuildUtils.isWeb ? 24 : 16),
|
||||||
|
fromAccountDashBoard: true,
|
||||||
|
vacationResponse: controller.vacationResponse.value!,
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||||
|
leadingIcon: const Padding(
|
||||||
|
padding: EdgeInsets.only(right: 16),
|
||||||
|
child: Icon(Icons.timer, size: 20),
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
Expanded(child: _viewDisplayedOfAccountMenuItem())
|
||||||
|
]),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
))
|
||||||
]),
|
]),
|
||||||
Expanded(child: Row(
|
mobile: SettingsView(closeAction: () => controller.backToMailboxDashBoard(context))
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
),
|
||||||
children: [
|
|
||||||
SizedBox(child: ManageAccountMenuView(), width: ResponsiveUtils.defaultSizeMenu),
|
|
||||||
Expanded(child: Container(
|
|
||||||
color: AppColor.colorBgDesktop,
|
|
||||||
child: Column(children: [
|
|
||||||
Obx(() {
|
|
||||||
if (controller.vacationResponse.value?.vacationResponderIsValid == true) {
|
|
||||||
return VacationNotificationMessageWidget(
|
|
||||||
margin: const EdgeInsets.only(
|
|
||||||
top: 16,
|
|
||||||
left: BuildUtils.isWeb ? 24 : 16,
|
|
||||||
right: BuildUtils.isWeb ? 24 : 16),
|
|
||||||
fromAccountDashBoard: true,
|
|
||||||
vacationResponse: controller.vacationResponse.value!,
|
|
||||||
actionGotoVacationSetting: !controller.inVacationSettings()
|
|
||||||
? () => controller.selectAccountMenuItem(AccountMenuItem.vacation)
|
|
||||||
: null,
|
|
||||||
actionEndNow: () => controller.disableVacationResponder());
|
|
||||||
} else if ((controller.vacationResponse.value?.vacationResponderIsWaiting == true
|
|
||||||
|| controller.vacationResponse.value?.vacationResponderIsStopped == true)
|
|
||||||
&& controller.accountMenuItemSelected.value == AccountMenuItem.vacation) {
|
|
||||||
return VacationNotificationMessageWidget(
|
|
||||||
margin: const EdgeInsets.only(
|
|
||||||
top: 16,
|
|
||||||
left: BuildUtils.isWeb ? 24 : 16,
|
|
||||||
right: BuildUtils.isWeb ? 24 : 16),
|
|
||||||
fromAccountDashBoard: true,
|
|
||||||
vacationResponse: controller.vacationResponse.value!,
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
|
||||||
leadingIcon: const Padding(
|
|
||||||
padding: EdgeInsets.only(right: 16),
|
|
||||||
child: Icon(Icons.timer, size: 20),
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
Expanded(child: _viewDisplayedOfAccountMenuItem())
|
|
||||||
]),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
))
|
|
||||||
]),
|
|
||||||
mobile: SettingsView(closeAction: () => controller.backToMailboxDashBoard(context))
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user