Add a few more providers and fix multiple bugs

This commit is contained in:
Tommaso Berlose
2020-10-11 21:59:44 +02:00
parent 1644fb7682
commit 6a912ee003
149 changed files with 923 additions and 404 deletions

View File

@ -8,6 +8,9 @@ import android.content.Intent
import com.tommasoberlose.anotherwidget.global.Actions
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import java.util.*
@ -22,7 +25,9 @@ class WeatherReceiver : BroadcastReceiver() {
Intent.ACTION_TIME_CHANGED -> setUpdates(context)
Actions.ACTION_WEATHER_UPDATE -> {
WeatherHelper.updateWeather(context)
GlobalScope.launch(Dispatchers.IO) {
WeatherHelper.updateWeather(context)
}
}
}
}