mirror of
https://github.com/immich-app/immich.git
synced 2025-02-11 01:18:24 -05:00
fixes(mobile) back navigation issue on android (#841)
This commit is contained in:
parent
95d8f60389
commit
0309b47515
1 changed files with 5 additions and 7 deletions
|
@ -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…
Add table
Reference in a new issue