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
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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user