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

@ -0,0 +1,19 @@
package com.tommasoberlose.anotherwidget.ui.viewmodels
import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.chibatching.kotpref.livedata.asLiveData
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
class WeatherProviderViewModel(application: Application) : AndroidViewModel(application) {
val weatherProvider = Preferences.asLiveData(Preferences::weatherProvider)
val weatherProviderError = Preferences.asLiveData(Preferences::weatherProviderError)
val weatherProviderLocationError = Preferences.asLiveData(Preferences::weatherProviderLocationError)
}