mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	fixed back button navigation with drawer (#1711)
This commit is contained in:
		
							parent
							
								
									6e4ba6184b
								
							
						
					
					
						commit
						b71a86142b
					
				@ -111,15 +111,13 @@ class TabControllerPage extends ConsumerWidget {
 | 
				
			|||||||
      ],
 | 
					      ],
 | 
				
			||||||
      builder: (context, child, animation) {
 | 
					      builder: (context, child, animation) {
 | 
				
			||||||
        final tabsRouter = AutoTabsRouter.of(context);
 | 
					        final tabsRouter = AutoTabsRouter.of(context);
 | 
				
			||||||
        final appRouter = AutoRouter.of(context);
 | 
					 | 
				
			||||||
        return WillPopScope(
 | 
					        return WillPopScope(
 | 
				
			||||||
          onWillPop: () async {
 | 
					          onWillPop: () async {
 | 
				
			||||||
            bool atHomeTab = tabsRouter.activeIndex == 0;
 | 
					            bool atHomeTab = tabsRouter.activeIndex == 0;
 | 
				
			||||||
            if (!atHomeTab) {
 | 
					            if (!atHomeTab) {
 | 
				
			||||||
              tabsRouter.setActiveIndex(0);
 | 
					              tabsRouter.setActiveIndex(0);
 | 
				
			||||||
            } else {
 | 
					            } 
 | 
				
			||||||
              appRouter.navigateBack();
 | 
					
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            return atHomeTab;
 | 
					            return atHomeTab;
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          child: LayoutBuilder(
 | 
					          child: LayoutBuilder(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user