From 53b290ab4977cec919471c11d0acb079c433b4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Sat, 9 May 2026 21:31:39 +0200 Subject: [PATCH] ensured timetable visibility on widget navigation by resetting root navigator --- lib/app.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/app.dart b/lib/app.dart index 045db68..7a9b2f6 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -65,6 +65,14 @@ class _AppState extends State with WidgetsBindingObserver { Future _handlePendingWidgetNavigation() async { final pending = await WidgetNavigation.consumePendingTimetableTap(); if (!pending || !mounted) return; + // Routes pushed with `withNavBar: false` (chat views, file viewers, …) + // sit on the root navigator above the bottom-nav, so a bare jumpToTab + // would swap the tab behind them and leave the user staring at the + // previous screen. Reset to the tab root first. + final navigator = Navigator.of(context); + if (navigator.canPop()) { + navigator.popUntil((route) => route.isFirst); + } AppRoutes.goToTab(context, Modules.timetable); }