1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

fixed back button navigation with drawer (#1711)

This commit is contained in:
martyfuhry 2023-02-10 01:04:41 -05:00 committed by GitHub
parent 6e4ba6184b
commit b71a86142b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,15 +111,13 @@ class TabControllerPage extends ConsumerWidget {
],
builder: (context, child, animation) {
final tabsRouter = AutoTabsRouter.of(context);
final appRouter = AutoRouter.of(context);
return WillPopScope(
onWillPop: () async {
bool atHomeTab = tabsRouter.activeIndex == 0;
if (!atHomeTab) {
tabsRouter.setActiveIndex(0);
} else {
appRouter.navigateBack();
}
}
return atHomeTab;
},
child: LayoutBuilder(