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);
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user