This commit is contained in:
Tommaso Berlose
2020-05-05 14:29:30 +02:00
parent 4feb72381d
commit f5c4ee7eb0
32 changed files with 394 additions and 228 deletions

View File

@ -1,6 +1,7 @@
package com.tommasoberlose.anotherwidget.network
import android.content.Context
import android.util.Log
import com.kwabenaberko.openweathermaplib.constants.Units
import com.kwabenaberko.openweathermaplib.implementation.OpenWeatherMapHelper
import com.kwabenaberko.openweathermaplib.implementation.callbacks.CurrentWeatherCallback
@ -23,9 +24,7 @@ class WeatherNetworkApi(val context: Context) {
Preferences.weatherTemp = currentWeather.main.temp.toFloat()
Preferences.weatherIcon = currentWeather.weather[0].icon
Preferences.weatherRealTempUnit = Preferences.weatherTempUnit
MainWidget.updateWidget(
context
)
MainWidget.updateWidget(context)
EventBus.getDefault().post(MainActivity.UpdateUiMessageEvent())
}