Skip to content

Weather refetch gets skipped when watch has no data #123

@mattrossman

Description

@mattrossman

On some dev installs the watchface starts on No data :( and stays there until I open settings and force a weather refetch.

The mismatch seems to be:

  • the watch UI decides whether weather exists from persisted C-side state (forecast_start)
  • PKJS decides whether to auto-fetch only from phone-side localStorage (lastFetchSuccess)

So the phone can think weather is still fresh while the watch has no valid forecast data, and startup/tick fetches get skipped.

Smallest fix idea:

  • have the watch send a startup ping saying whether it has valid forecast data
  • if not, PKJS should force a fetch immediately
  • keep the current 30-minute freshness gate when the watch already has data

Relevant code:

  • src/c/layers/loading_layer.c:36-42
  • src/pkjs/index.js:558-586
  • src/c/appendix/app_message.c:127-135

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions