implemented Ticker page selection persistence and enhanced ProseMirror table display modes

This commit is contained in:
2026-07-10 19:15:52 +02:00
parent 0d01f6b631
commit 37608e59b3
10 changed files with 827 additions and 131 deletions
@@ -6,13 +6,19 @@ import '../../../../../api/marianumconnect/queries/get_ticker_nav/get_ticker_nav
part 'ticker_state.freezed.dart';
part 'ticker_state.g.dart';
/// Hydrated ticker module state: the current "Aktuelles" post plus the filtered
/// page tree. Page contents are loaded on demand in the detail screen and are
/// deliberately not cached here.
/// Hydrated ticker module state: the current "Aktuelles" post, the filtered
/// page tree and the slug of the page the user last had open ([selectedSlug],
/// null = "Aktuelles" home). Persisting the slug lets the ticker reopen on the
/// last page instead of always falling back to home; a slug that is no longer
/// in [nav] (deleted/hidden) is discarded by the view. Page contents are loaded
/// on demand in the detail screen and are deliberately not cached here.
@freezed
abstract class TickerState with _$TickerState {
const factory TickerState({TickerResponse? ticker, TickerNavResponse? nav}) =
_TickerState;
const factory TickerState({
TickerResponse? ticker,
TickerNavResponse? nav,
String? selectedSlug,
}) = _TickerState;
factory TickerState.fromJson(Map<String, dynamic> json) =>
_$TickerStateFromJson(json);