Update deps

This commit is contained in:
Henry Hiles 2023-12-23 07:56:16 -05:00
parent 236995b5f7
commit 1737741d77
6 changed files with 27 additions and 28 deletions

View file

@ -4,7 +4,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.coroutineScope
import cafe.adriel.voyager.core.model.screenModelScope
import com.henryhiles.qweather.domain.repository.WeatherRepository
import com.henryhiles.qweather.domain.util.Resource
import com.henryhiles.qweather.domain.weather.DailyWeatherData
@ -26,7 +26,7 @@ class DailyWeatherScreenModel(
fun loadWeatherInfo(cache: Boolean = true) {
val location = locationPreferenceManager.locations[locationPreferenceManager.selectedIndex]
coroutineScope.launch {
screenModelScope.launch {
state = state.copy(isLoading = true, error = null)
state = when (val result = repository.getDailyWeatherData(
lat = location.latitude,

View file

@ -4,7 +4,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.coroutineScope
import cafe.adriel.voyager.core.model.screenModelScope
import com.henryhiles.qweather.domain.repository.WeatherRepository
import com.henryhiles.qweather.domain.util.Resource
import com.henryhiles.qweather.domain.weather.HourlyWeatherInfo
@ -26,7 +26,7 @@ class HourlyWeatherScreenModel(
fun loadWeatherInfo(cache: Boolean = true) {
val location = locationPreferenceManager.locations[locationPreferenceManager.selectedIndex]
coroutineScope.launch {
screenModelScope.launch {
state = state.copy(isLoading = true, error = null, selected = null)
state = when (val result =
repository.getHourlyWeatherData(

View file

@ -5,7 +5,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.coroutineScope
import cafe.adriel.voyager.core.model.screenModelScope
import com.henryhiles.qweather.domain.geocoding.GeocodingData
import com.henryhiles.qweather.domain.manager.BasePreferenceManager
import com.henryhiles.qweather.domain.repository.GeocodingRepository
@ -35,7 +35,7 @@ class LocationPickerScreenModel(
private set
fun loadGeolocationInfo(location: String) {
coroutineScope.launch {
screenModelScope.launch {
state = state.copy(isLoading = true, error = null)
state = when (val result =