implemented Ticker page selection persistence and enhanced ProseMirror table display modes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user