Skip to content

High performance self-hosted photo and video management solution.

fixes(mobile) back navigation issue on android (#841)

Zeeshan Khan0309b475156b
diff --git a/mobile/lib/shared/views/tab_controller_page.dart b/mobile/lib/shared/views/tab_controller_page.dart
index 92d79022c2..8f41963c50 100644
--- a/mobile/lib/shared/views/tab_controller_page.dart
+++ b/mobile/lib/shared/views/tab_controller_page.dart
@@ -24,15 +24,13 @@ class TabControllerPage extends ConsumerWidget {
final appRouter = AutoRouter.of(context);
return WillPopScope(
onWillPop: () async {
- if (tabsRouter.activeIndex == 0) {
- if (!appRouter.canNavigateBack) {
- appRouter.navigateBack();
- }
- return appRouter.canNavigateBack;
- } else {
+ bool atHomeTab = tabsRouter.activeIndex == 0;
+ if (!atHomeTab) {
tabsRouter.setActiveIndex(0);
+ } else {
+ appRouter.navigateBack();
}
- return false;
+ return atHomeTab;
},
child: Scaffold(
body: FadeTransition(