Skip to content

Commit 0a8d1b2

Browse files
dab246hoangdat
authored andcommitted
TF-3758 Support system back button close left mailbox menu when it is opened on web responsive
Signed-off-by: dab246 <[email protected]>
1 parent 6acb162 commit 0a8d1b2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,12 +2902,18 @@ class MailboxDashBoardController extends ReloadableController
29022902
openDefaultMailbox();
29032903
return true;
29042904
}
2905-
}
2906-
if (searchController.isSearchEmailRunning) {
2905+
} else if (searchController.isSearchEmailRunning) {
29072906
dispatchMailboxUIAction(SystemBackToInboxAction());
29082907
return true;
29092908
} else {
2910-
if (selectedMailbox.value?.isInbox == true) {
2909+
if (PlatformInfo.isWeb &&
2910+
currentContext != null &&
2911+
!responsiveUtils.isDesktop(currentContext!) &&
2912+
isDrawerOpen
2913+
) {
2914+
closeMailboxMenuDrawer();
2915+
return true;
2916+
} else if (selectedMailbox.value?.isInbox == true) {
29112917
pushAndPopAll(AppRoutes.home);
29122918
return true;
29132919
} else {

0 commit comments

Comments
 (0)