From e11439e2852034d41f9eeb0a425da7a071ade22f Mon Sep 17 00:00:00 2001 From: Sander Baas Date: Sat, 20 Jul 2019 13:52:50 +0200 Subject: [PATCH] fixes #18: keep dark widget dark after auto updating --- app/src/main/java/nl/implode/weer/ForecastWidgetService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nl/implode/weer/ForecastWidgetService.java b/app/src/main/java/nl/implode/weer/ForecastWidgetService.java index 4f23dfa..7e7eb78 100644 --- a/app/src/main/java/nl/implode/weer/ForecastWidgetService.java +++ b/app/src/main/java/nl/implode/weer/ForecastWidgetService.java @@ -97,8 +97,8 @@ private String getIconImage(String iconCode) { private void processForecasts(JSONObject forecast, Integer widgetId) { Integer maxDays = 4; - String widgetStyle = ForecastWidgetConfigureActivity.loadPref(gContext, "widgetStyle", widgetId); - dark = widgetStyle == "dark"; + CharSequence widgetStyle = ForecastWidgetConfigureActivity.loadPref(gContext, "widgetStyle", widgetId); + dark = widgetStyle.equals("dark"); RemoteViews views = new RemoteViews(gContext.getPackageName(), getLayout("forecast_widget")); CharSequence stationName = ForecastWidgetConfigureActivity.loadPref(gContext, "stationName", widgetId); CharSequence stationCountry = ForecastWidgetConfigureActivity.loadPref(gContext, "stationCountry", widgetId);