This commit is contained in:
MM20 2023-04-20 20:02:53 +02:00
parent 7b00b200da
commit cea492af67
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 2 additions and 6 deletions

View File

@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
@ -45,7 +44,6 @@ import androidx.compose.ui.draw.rotate
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.res.booleanResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@ -72,7 +70,7 @@ import kotlin.math.roundToInt
@Composable
fun WeatherWidget(widget: WeatherWidget) {
val viewModel: WeatherWidgetWM = viewModel()
val viewModel: WeatherWidgetVM = viewModel()
val context = LocalContext.current
val lifecycleOwner = LocalLifecycleOwner.current

View File

@ -8,17 +8,15 @@ import de.mm20.launcher2.preferences.LauncherDataStore
import de.mm20.launcher2.weather.DailyForecast
import de.mm20.launcher2.weather.Forecast
import de.mm20.launcher2.weather.WeatherRepository
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.shareIn
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import kotlin.math.max
import kotlin.math.min
class WeatherWidgetWM : ViewModel(), KoinComponent {
class WeatherWidgetVM : ViewModel(), KoinComponent {
private val weatherRepository: WeatherRepository by inject()
private val permissionsManager: PermissionsManager by inject()