breezy-weather / breezy-weather

A Material Design Weather Application
GNU Lesser General Public License v3.0
5.43k stars 165 forks source link

Allow to customize name of a manually added location #752

Open papjul opened 7 months ago

papjul commented 7 months ago

The change would happen on the city field.

For manually added locations: 1) First step is a major cleanup of how locations are handled on location search/reverse geocoding sources. A LocationWrapper object is safer to use to avoid any risk of a source overriding important data. 2) Second step is to get that LocationWrapper on RefreshHelper side and don’t process the city field from LocationWrapper if that field is empty or null, and leave the previous city value (whether it was manually input by user, or from previous reverse geocoding). If the LocationWrapper returns a valued city field, then it will override manually entered city name as the user requested a reverse geocoding update.

For current location, it’s more tricky as the reverse geocoding happens every time user changes location. It’s probably safer to not offer that option for current location as that would be confusing to have the wrong city name on travel.

papjul commented 7 months ago

No longer interesting since the fix from e3df6766585f52db10c9e9e62c7d434d88a7ad18

papjul commented 3 months ago

Re-opening with a different implementation: a customName field (with city preserved). An icon like the current location icon would be displayed next to customized names for debug purposes. Erasing the customName would revert to preserved city field.