chore: apply suggestion

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Yaros 2026-08-10 19:40:44 +02:00 committed by GitHub
parent 7f45dfac9c
commit 475ef22ccc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,14 +102,7 @@ class _TabShellPageState extends ConsumerState<TabShellPage> {
final tabsRouter = AutoTabsRouter.of(context);
return PopScope(
canPop: tabsRouter.activeIndex == 0 && !_isMultiSelectEnabled,
onPopInvokedWithResult: (didPop, _) {
// When a multi-select is active, step aside and let the timeline's own PopScope
// reset the selection instead of switching back to the photos tab.
if (didPop || _isMultiSelectEnabled) {
return;
}
tabsRouter.setActiveIndex(0);
},
onPopInvokedWithResult: (didPop, _) => (didPop || _isMultiSelectEnabled) ? null : tabsRouter.setActiveIndex(0),
child: Scaffold(
resizeToAvoidBottomInset: false,
body: isScreenLandscape