Skip to content

fix: Froyo widget says when it updated, with a refresh button - #43

Merged
rayvader merged 1 commit into
mainfrom
fix/widget-refresh
Nov 5, 2026
Merged

rayvader merged 1 commit into
mainfrom
fix/widget-refresh

Conversation

@rayvader

@rayvader rayvader commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

The Froyo · Upcoming widget now says when its list was read, and has a refresh button.

State Header after the count
good read Updated HH:mm (24 h, local)
failed read as of HH:mm (unchanged; rows kept)
refresh button running Updating… + spinner in place of ⟳
never read nothing
  • ⟳ in the header sends an explicit broadcast to FroyoWidgetProvider, which marks a refresh as running, redraws, and runs a one-time read with no network wait (offline fails at once to as of). The worker clears the mark in finally; a mark older than 2 min is ignored so a lost run never spins forever.
  • Tapping the widget body still opens the app.
  • The note shares the header line, so rows per height are unchanged and no row is hidden.
  • Pure logic in core/Upcoming (syncLine, isRefreshing).

Tests

  • UpcomingTest: Updated in local 24 h time (two zones, 23:05), as of after a failure, nothing before a first read, Updating while running, spinner stops when cleared/stale/clock back, rows per height unchanged.
  • e2e Froyo widget: tap ⟳ -> 5 open · Updated HH:mm matching the phone clock, all 5 rows still show; gateway down -> as of HH:mm, rows kept, no Updated; back up -> Updated again.

Not covered

  • A real Smart Launcher.

The header shows 'Updated HH:mm' (24 h, local) after a good read and
keeps 'as of HH:mm' after a failed one. A small refresh button in the
header reads the list now and shows a spinner and 'Updating...' while it
runs. The note shares the header line, so no row is lost.
@rayvader
rayvader enabled auto-merge November 5, 2026 08:29
@rayvader
rayvader merged commit 7d7f424 into main Nov 5, 2026
6 checks passed
@rayvader
rayvader deleted the fix/widget-refresh branch November 5, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant