mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 18:08:48 -07:00
fixes(mobile) back navigation issue on android (#841)
This commit is contained in:
parent
95d8f60389
commit
0309b47515
@ -24,15 +24,13 @@ class TabControllerPage extends ConsumerWidget {
|
|||||||
final appRouter = AutoRouter.of(context);
|
final appRouter = AutoRouter.of(context);
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
if (tabsRouter.activeIndex == 0) {
|
bool atHomeTab = tabsRouter.activeIndex == 0;
|
||||||
if (!appRouter.canNavigateBack) {
|
if (!atHomeTab) {
|
||||||
appRouter.navigateBack();
|
|
||||||
}
|
|
||||||
return appRouter.canNavigateBack;
|
|
||||||
} else {
|
|
||||||
tabsRouter.setActiveIndex(0);
|
tabsRouter.setActiveIndex(0);
|
||||||
|
} else {
|
||||||
|
appRouter.navigateBack();
|
||||||
}
|
}
|
||||||
return false;
|
return atHomeTab;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: FadeTransition(
|
body: FadeTransition(
|
||||||
|
Loading…
Reference in New Issue
Block a user