refactored and condensed technical documentation and comments across the codebase to improve readability

This commit is contained in:
2026-07-06 23:17:06 +02:00
parent c48f5ef215
commit a19b67eb84
27 changed files with 99 additions and 193 deletions
@@ -12,14 +12,11 @@ import '../../timetable/bloc/timetable_event.dart';
import '../../timetable/bloc/timetable_state.dart';
import '../repository/foreign_timetable_repository.dart';
/// Drives a foreign element's timetable. Mirrors the week-loading and
/// week-navigation logic of `TimetableBloc` but (a) loads weeks from the
/// element endpoint, (b) carries no custom events, and (c) does not persist —
/// it is created per opened page and recreated for every selected element.
///
/// It reuses [TimetableState] verbatim so the existing render pipeline works
/// unchanged; `customEvents` simply stays null (the foreign view uses an
/// `isReady` predicate that ignores it).
/// Drives a foreign element's timetable. Mirrors `TimetableBloc`'s week-loading
/// and navigation but loads weeks from the element endpoint, carries no custom
/// events, and does not persist (page-scoped, recreated per element). Reuses
/// [TimetableState] verbatim so the render pipeline is unchanged; `customEvents`
/// stays null (the foreign view's `isReady` predicate ignores it).
class ForeignTimetableBloc
extends
LoadableHydratedBloc<
@@ -56,10 +53,8 @@ class ForeignTimetableBloc
);
}
// Persistence is disabled: this bloc is page-scoped and element-specific, so
// there is nothing worth restoring across launches. Returning null from
// toJson means HydratedBloc never writes anything; fromJson ignores any
// legacy payload and starts fresh.
// Persistence disabled: page-scoped and element-specific, nothing worth
// restoring. toJson returns null so nothing is written; fromJson starts fresh.
@override
Map<String, dynamic>? toJson(LoadableState<TimetableState> state) => null;