refactored lesson details, centralized logout logic, and added resume re-fetch

This commit is contained in:
2026-05-06 16:27:45 +02:00
parent 71506aab2d
commit 50d2941e52
11 changed files with 309 additions and 68 deletions
+5
View File
@@ -17,6 +17,7 @@ import 'state/app/modules/app_modules.dart';
import 'state/app/modules/breaker/bloc/breaker_bloc.dart';
import 'state/app/modules/chat_list/bloc/chat_list_bloc.dart';
import 'state/app/modules/settings/bloc/settings_cubit.dart';
import 'state/app/modules/timetable/bloc/timetable_bloc.dart';
import 'utils/debouncer.dart';
import 'view/pages/overhang.dart';
import 'widget/breaker/breaker.dart';
@@ -54,6 +55,10 @@ class _AppState extends State<App> with WidgetsBindingObserver {
if (!mounted) return;
context.read<BreakerBloc>().refresh();
context.read<ChatListBloc>().refresh();
// App is freshly mounted on every login (BlocConsumer in main.dart
// swaps it in for Login), so this also covers the post-logout case
// where the bloc was reset to an empty state and needs a fresh fetch.
context.read<TimetableBloc>().refresh();
});
_updateTimings = Timer.periodic(const Duration(seconds: 30), (_) {