fix(city): persist full city list and re-emit dashboard context on re-selection
- Map cityList rows without coordinates; fall back en/ru/be for display names - Replace local city cache on sync when opening city screen - Use SharedFlow + prefs reads so re-selecting the same city (e.g. Minsk) notifies dashboard Made-with: Cursor
This commit is contained in:
@@ -51,6 +51,7 @@ class CityViewModel @Inject constructor(
|
||||
private fun loadCities() {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val localeLanguage = Locale.getDefault().language
|
||||
cityService.syncCitiesFromRemote(localeLanguage)
|
||||
val regions = cityService.getCitiesGroupedByCountry(localeLanguage)
|
||||
val selectedCity = cityService.getSelectedCity()
|
||||
val hasOnlyDefaultCity = regions.isEmpty()
|
||||
|
||||
Reference in New Issue
Block a user