fix(ui): expose stale banner under cold-start failures when no successful snapshot exists

This commit is contained in:
2026-07-16 21:21:07 +09:00
parent 7c981549a2
commit 7e4cab6c09
2 changed files with 3 additions and 2 deletions
@@ -12,11 +12,12 @@ class StaleBanner extends StatelessWidget {
@override @override
Widget build(BuildContext context) { 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 lastOk = poll.lastOkAt;
final lastOkText = lastOk == null final lastOkText = lastOk == null
? '?' ? 'never'
: '${lastOk.hour.toString().padLeft(2, '0')}:' : '${lastOk.hour.toString().padLeft(2, '0')}:'
'${lastOk.minute.toString().padLeft(2, '0')}:' '${lastOk.minute.toString().padLeft(2, '0')}:'
'${lastOk.second.toString().padLeft(2, '0')}'; '${lastOk.second.toString().padLeft(2, '0')}';