Commit Graph
3193 Commits
Author SHA1 Message Date
PranshulGG 700c64bbfa update alert and air quality source display strings and adjust recommended source filtering logic 2026-08-19 23:00:08 +05:30
PranshulGG 9c3e5dbb97 filter recommended sources from global sources in EditLocationBottomSheet 2026-08-19 22:50:59 +05:30
PranshulGG f5db93222f update weather sources in README and metadata 2026-08-19 22:44:09 +05:30
Pranshul 0a31a25250 Merge pull request #1047 from reveler-hub/feature/jma-weather-source
Add JMA (Japan) as a weather forecast source
2026-08-19 22:40:28 +05:30
PranshulGG c6c68c8202 remove todo comment 2026-08-19 22:40:09 +05:30
reveler-hub a252e9ac2e Compute JMA's current "feels like" temperature
AMeDAS doesn't report apparent temperature directly, so this was
hardcoded null - "Feels like -°" on every location. Wired through the
app's existing computeApparentTemperature() fallback (same convention
FMI/DWD/NWS/SMHI/etc already use for this exact gap) using AMeDAS's
own real temp/humidity/wind, since those are all genuine live
observations, not derived/forecast values.
2026-08-20 04:58:51 +12:00
reveler-hub eb4b6eff0d Address review: clear alerts/AQ via an explicit null result instead of eagerly on every fetch
PranshulGG pointed out the previous fix (resetting alerts/airQuality at
the top of every getWeather() call) caused a visible flash on every
refresh, not just a location switch, since it cleared state before
knowing whether real data was coming back.

Per his suggested approach: onAlerts/onAirQuality now always fire
(never skipped), passing null when no repository resolves for the
location's alertSource/airQualitySource instead of skipping the
callback. handleAlerts/handleAirQuality treat a null result as an
explicit "clear" signal, while a real Success/Error updates normally
exactly as before - so a location with real alerts is never touched
until the actual result arrives (no flash), and a location with no
alert source now correctly clears once that's determined, without
ever clearing eagerly beforehand.
2026-08-20 04:58:51 +12:00
PranshulGG 33d44e540b try everything to get the country code 2026-08-19 22:09:01 +05:30
PranshulGG cf124b8fe8 try everything to get the country code 2026-08-19 21:58:59 +05:30
PranshulGG ffd0e121f5 implement alert fetching logic in PirateWeatherRepository and improve null handling in HumidityBlock 2026-08-19 20:58:58 +05:30
reveler-hub 634ba26bbd Fix alerts/air quality carrying over when switching to a location with no source configured
WeatherViewModel.getWeather() reset isError/isUnsupportedSource/
isAirQualityLoading on every fetch, but never alerts or airQuality.
SourceDataRepository.getData() only invokes onAlerts/onAirQuality when
the location's alertSource/airQualitySource resolves to a real
repository - a location with alertSource == NONE (the default for
every location right now, since none of it is auto-selected on
creation) never gets a callback at all, so the previous location's
alerts/air quality stayed on screen indefinitely after switching.

Found while testing JMA's new alerts capability: switching from a
Japan location with real active alerts to one with no alert source
configured kept showing the old alerts. Reproduced and confirmed fixed
on-device.
2026-08-20 03:09:44 +12:00
reveler-hub 41b681f571 Add JMA alerts capability
JMA has its own alerts endpoint (warning/data/warning/{officeCode}.json),
keyed by the same officeCode/class10Code already resolved and cached for
the weather source, so no extra location lookup is needed. Filters out
"no warnings issued"/"cleared" statuses, maps JMA's warning-code enum to
severity (~26 codes across advisory/warning/emergency-warning tiers,
transcribed via Breezy Weather's JmaService.kt, same technique used to
find the hourly-forecast endpoint).

Tested live: Wakkanai, Japan currently has 3 active advisories
(thunderstorm, gale, dense fog), confirmed rendering correctly.
2026-08-20 03:07:11 +12:00
PranshulGG 11b2755c09 implement alert fetching logic in PirateWeatherRepository and improve null handling in HumidityBlock 2026-08-19 19:56:31 +05:30
reveler-hub a7b77cc985 Add JMA (Japan Meteorological Agency) as a weather forecast source
Closes #979. Resolves each location to the nearest of JMA's 142
class10 regions and pulls real numeric hourly temp/wind from the
undocumented jmatile/data/wdist/VPFD endpoint, daily data from the
weekly forecast block, and current conditions from live AMeDAS
station observations. No API key required.
2026-08-20 00:47:12 +12:00
PranshulGG 79f61bee20 fix readme 2026-08-19 17:50:05 +05:30
PranshulGG 7b1098d936 fix readme 2026-08-19 17:49:21 +05:30
PranshulGG 5da6ab4690 humidity nullable 2026-08-19 17:42:21 +05:30
PranshulGG 74dd449600 humidity nullable 2026-08-19 17:39:48 +05:30
PranshulGG 6af2cbb3cb text field dialog ui adjustments 2026-08-19 17:29:08 +05:30
PranshulGG 987168b1e4 fix pirate Weather wind speed not being converted to canonical units 2026-08-19 17:28:45 +05:30
PranshulGG 8ac8300f29 refactor: update source architecture to support multiple capabilities from the same API 2026-08-19 16:34:04 +05:30
PranshulGG 8cd993e3d5 refactor: update source architecture to support multiple capabilities from the same API 2026-08-19 16:34:00 +05:30
PranshulGG 9c901ef2cd refactor: update source architecture to support multiple capabilities from the same API 2026-08-19 16:33:53 +05:30
PranshulGG b30c4e7418 refactor sources architecture 2026-08-19 16:31:23 +05:30
PranshulGG 149dabd82c refactor sources architecture 2026-08-19 16:31:11 +05:30
Pranshul 06626f72f0 Merge pull request #1043 from reveler-hub/fix/device-location-not-updating
Update device location on app-open and fix a leftover single-provider gate
2026-08-19 09:47:29 +05:30
PranshulGG b229b37e93 fix secondary weather condition selection and clustering 2026-08-18 21:47:08 +05:30
reveler-hub aa69f912d6 Shorten the isInitialized guard comment 2026-08-19 03:45:17 +12:00
reveler-hub b2d7b10470 Guard ON_START refetch against duplicating the initial cold-start load
PranshulGG flagged in review that ON_START now also calling getWeather()
could duplicate the fetch setActiveLocation() already triggers during
initial VM setup. Confirmed the concern is real: DisposableEffect(location)
re-subscribes when `location` goes from null to non-null right after cold
start, and Android replays a synthetic ON_START on subscribe when the
lifecycle is already started - so that resubscription does refire ON_START.

Guarded the getWeather() call on uiState.isInitialized (only true after the
first successful fetch completes), so it now only fires on a genuine
resume-from-background, not the cold-start race. Retested both cases on
the AVD: cold start no longer double-fetches, and #1035 still resolves
correctly on reopen after moving.
2026-08-19 03:36:24 +12:00
reveler-hub b288db34f4 Update device location on app-open and fix a leftover single-provider gate closes #1035
Two related device-location bugs found while investigating #1035:

- WeatherViewModel only checked/refreshed the device location on manual
  pull-to-refresh (isManualRefresh gate), never on app-open, the 45-min
  auto-refresh timer, or app-resume from background. Decoupled the check
  from isManualRefresh so it always runs for a device-location entry, and
  forces a real refetch (via isForceRefresh, not isManualRefresh, which
  would still hit the 15-min throttle) only when the position actually
  moved. Also wired an immediate check into WeatherAutoRefreshForeground's
  existing ON_START observer, since that's the only hook that already
  fires on every foreground-resume, not just cold start.

- DeviceLocationProvider.getDeviceLocation() still gated on the old
  single-provider selection (getProvider(), preferring NETWORK_PROVIDER)
  before ever reaching the dual-provider live-request logic added in the
  #938 fix. If that one provider happened to be present-but-disabled
  (e.g. "Device only" location mode, or no GMS/network-location backend),
  it failed instantly without ever trying GPS. Removed the stale gate.

Tested on an AVD: reproduced #1035 (background app, move >1000m, reopen
without refreshing -> location stayed stale), then confirmed the fix
resolves it end-to-end (name, coordinates, and weather data all update
on reopen, no manual refresh needed). Also confirmed the provider-gate
fix resolves an instant "Current location not found" on a device with
NETWORK_PROVIDER disabled but GPS enabled.
2026-08-19 02:56:09 +12:00
PranshulGG a08f76c261 Merge branch 'main' of https://github.com/PranshulGG/WeatherMaster 2026-08-18 20:23:46 +05:30
Pranshul 204c10c1d0 Merge pull request #1033 from PranshulGG/l10n_main
New Crowdin updates
2026-08-18 20:23:28 +05:30
Pranshul 3c0d720441 Merge branch 'main' into l10n_main
Signed-off-by: Pranshul <pranshul.devmain@gmail.com>
2026-08-18 20:23:18 +05:30
PranshulGG 69daeab654 Merge branch 'main' of https://github.com/PranshulGG/WeatherMaster 2026-08-18 20:17:30 +05:30
PranshulGG 8cb340127a add TODO for safeApiCall 2026-08-18 20:17:01 +05:30
Pranshul 1754f87005 Merge pull request #1041 from altendorfme/main
Add Pirate Weather (Global Coverage) source
2026-08-18 20:16:23 +05:30
Renan Bernordi 7ae657049d remove pirate weather alert api 2026-08-18 11:33:10 -03:00
Renan Bernordi 7f3dc42fbb Merge remote-tracking branch 'upstream/main'
# Conflicts:
#	app/src/main/java/com/pranshulgg/weather_master_app/core/di/network/ApiModule.kt
#	app/src/main/java/com/pranshulgg/weather_master_app/core/di/weather/WeatherRepositoryModule.kt
#	app/src/main/java/com/pranshulgg/weather_master_app/data/provider/WeatherRepositoryProvider.kt
2026-08-18 11:26:35 -03:00
Renan Bernordi 4c3f453e02 add pirate weather integration 2026-08-18 10:57:04 -03:00
Pranshul b05419b6a7 New translations strings.xml (Chinese Traditional)
[ci skip]
2026-08-18 17:38:47 +05:30
Pranshul 933c194fce New translations strings.xml (German)
[ci skip]
2026-08-18 17:38:46 +05:30
Pranshul 74dc479417 New translations strings.xml (French)
[ci skip]
2026-08-18 17:38:44 +05:30
Pranshul 8dd4807e34 New translations strings.xml (Ukrainian)
[ci skip]
2026-08-18 17:38:43 +05:30
Pranshul 336ae18f11 New translations strings.xml (Russian)
[ci skip]
2026-08-18 17:38:42 +05:30
Pranshul f6d084382e New translations strings.xml (Spanish)
[ci skip]
2026-08-18 17:38:40 +05:30
PranshulGG 47fa36dbe5 fix Pressure screen shows wrong values closes #1040 2026-08-18 13:07:41 +05:30
PranshulGG 635f1fa239 fix open-meteo errors on some models closes #1039 2026-08-18 12:26:56 +05:30
Pranshul c051980c9f New translations strings.xml (Arabic, Saudi Arabia)
[ci skip]
2026-08-18 11:37:41 +05:30
Pranshul e15c44a98a New translations strings.xml (Serbian (Latin))
[ci skip]
2026-08-18 11:37:40 +05:30
Pranshul 12f8d2bb40 New translations strings.xml (Filipino)
[ci skip]
2026-08-18 11:37:38 +05:30