diff --git a/app/src/main/java/foundation/e/blisslauncher/core/Preferences.java b/app/src/main/java/foundation/e/blisslauncher/core/Preferences.java index 859b4892fc171b7d744f5c7073b1a527405158db..70e6db98d6bb7b0056677ac7f057090596476862 100644 --- a/app/src/main/java/foundation/e/blisslauncher/core/Preferences.java +++ b/app/src/main/java/foundation/e/blisslauncher/core/Preferences.java @@ -242,8 +242,8 @@ public class Preferences { editor.apply(); } - public static String getCachedCity(Context context) { - return getPrefs(context).getString(Constants.CACHED_CITY, "Unknown"); + public static String getCachedCity(Context context, String fallbackCity) { + return getPrefs(context).getString(Constants.CACHED_CITY, fallbackCity); } public static long lastWeatherUpdateTimestamp(Context context) { diff --git a/app/src/main/java/foundation/e/blisslauncher/features/weather/ForecastBuilder.java b/app/src/main/java/foundation/e/blisslauncher/features/weather/ForecastBuilder.java index f0ba009b9d590d417a303c118ddc5fd60cac4be3..7b927e29f9b7d5538fc993277b94d27fa04a4255 100644 --- a/app/src/main/java/foundation/e/blisslauncher/features/weather/ForecastBuilder.java +++ b/app/src/main/java/foundation/e/blisslauncher/features/weather/ForecastBuilder.java @@ -73,7 +73,7 @@ public class ForecastBuilder { // City TextView textCity = weatherPanel.findViewById(R.id.weather_city); - textCity.setText(Preferences.getCachedCity(context)); + textCity.setText(Preferences.getCachedCity(context, w.getCity())); // Weather Condition TextView weatherCondition = weatherPanel.findViewById(R.id.weather_condition);