fix(ui): expose stale banner under cold-start failures when no successful snapshot exists
This commit is contained in:
+3
-2
@@ -12,11 +12,12 @@ class StaleBanner extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!poll.stale) return const SizedBox.shrink();
|
||||
final shouldShow = poll.stale || (poll.snapshot == null && poll.error != null);
|
||||
if (!shouldShow) return const SizedBox.shrink();
|
||||
|
||||
final lastOk = poll.lastOkAt;
|
||||
final lastOkText = lastOk == null
|
||||
? '?'
|
||||
? 'never'
|
||||
: '${lastOk.hour.toString().padLeft(2, '0')}:'
|
||||
'${lastOk.minute.toString().padLeft(2, '0')}:'
|
||||
'${lastOk.second.toString().padLeft(2, '0')}';
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user