add refresh button to pending page
All checks were successful
Release / meta (push) Successful in 7s
Release / linux-build (push) Successful in 50s
Release / web-build (push) Successful in 2m23s
Release / android-build (push) Successful in 7m48s
Release / release-master (push) Successful in 18s
Release / release-dev (push) Successful in 20s

This commit is contained in:
2026-01-12 16:37:01 +00:00
parent e9b328e7e6
commit 3b7ec31e5d
4 changed files with 196 additions and 2 deletions

View File

@@ -18,10 +18,12 @@ class LocoTimelinePage extends StatefulWidget {
super.key,
required this.locoId,
required this.locoLabel,
this.forceShowPending = false,
});
final int locoId;
final String locoLabel;
final bool forceShowPending;
@override
State<LocoTimelinePage> createState() => _LocoTimelinePageState();
@@ -41,7 +43,13 @@ class _LocoTimelinePageState extends State<LocoTimelinePage> {
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) async {
await _restorePendingVisibility();
if (widget.forceShowPending) {
setState(() {
_showPending = true;
});
} else {
await _restorePendingVisibility();
}
if (!mounted) return;
await _load();
});