[SHARED] Improve stability, libs update
This commit is contained in:
@@ -12,7 +12,7 @@ androidxTestExt = "1.3.0"
|
||||
androidxTestRules = "1.7.0"
|
||||
androidxTestRunner = "1.7.0"
|
||||
androidxTv = "1.0.1"
|
||||
androidxWear = "1.6.0"
|
||||
androidxWear = "1.6.1"
|
||||
baselineprofile = "1.5.0-alpha05"
|
||||
benchmarkMacroJunit4 = "1.4.1"
|
||||
coil = "3.4.0"
|
||||
@@ -38,7 +38,7 @@ kotlinxSerialization = "1.10.0"
|
||||
kover = "0.9.8"
|
||||
ktfmt = "0.62"
|
||||
licenses = "3.1.2"
|
||||
oshi = "6.11.0"
|
||||
oshi = "6.11.1"
|
||||
profileinstaller = "1.4.1"
|
||||
relinker = "1.4.5"
|
||||
spotless = "8.4.0"
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.cpu
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.model.CpuData
|
||||
@@ -34,5 +35,5 @@ class CpuInfoViewModel(cpuDataObservable: CpuDataObservable) : ViewModel() {
|
||||
.map { UiState(isInitializing = false, cpuData = it) }
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), UiState())
|
||||
|
||||
data class UiState(val isInitializing: Boolean = true, val cpuData: CpuData? = null)
|
||||
@Stable data class UiState(val isInitializing: Boolean = true, val cpuData: CpuData? = null)
|
||||
}
|
||||
|
||||
+2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.gpu
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.model.ItemValue
|
||||
@@ -40,6 +41,7 @@ class GpuInfoViewModel(private val gpuDataObservable: GpuDataObservable) : ViewM
|
||||
gpuDataObservable(GpuDataObservable.Params(glVendor, glRenderer, glExtensions))
|
||||
}
|
||||
|
||||
@Stable
|
||||
data class UiState(
|
||||
val isInitializing: Boolean = true,
|
||||
val gpuData: ImmutableList<ItemValue> = persistentListOf(),
|
||||
|
||||
+2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.hardware
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.data.local.IUserPreferencesRepository
|
||||
@@ -47,6 +48,7 @@ class HardwareInfoViewModel(
|
||||
getHardwareDataInteractor()
|
||||
}
|
||||
|
||||
@Stable
|
||||
data class UiState(
|
||||
val isInitializing: Boolean = true,
|
||||
val hardwareItems: ImmutableList<ItemValue> = persistentListOf(),
|
||||
|
||||
+2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.os
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.model.ItemValue
|
||||
@@ -35,6 +36,7 @@ class OsInfoViewModel(getOsDataInteractor: GetOsDataInteractor) : ViewModel() {
|
||||
.map { UiState(isInitializing = false, items = it.toImmutableList()) }
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), UiState())
|
||||
|
||||
@Stable
|
||||
data class UiState(
|
||||
val isInitializing: Boolean = true,
|
||||
val items: ImmutableList<ItemValue> = persistentListOf(),
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.ram
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.model.RamData
|
||||
@@ -34,5 +35,5 @@ class RamInfoViewModel(ramDataObservable: RamDataObservable) : ViewModel() {
|
||||
.map { UiState(isInitializing = false, ramData = it) }
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), UiState())
|
||||
|
||||
data class UiState(val isInitializing: Boolean = true, val ramData: RamData? = null)
|
||||
@Stable data class UiState(val isInitializing: Boolean = true, val ramData: RamData? = null)
|
||||
}
|
||||
|
||||
+2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.screen
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.model.ItemValue
|
||||
@@ -35,6 +36,7 @@ class ScreenInfoViewModel(getScreenDataInteractor: GetScreenDataInteractor) : Vi
|
||||
.map { UiState(isInitializing = false, items = it.toImmutableList()) }
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), UiState())
|
||||
|
||||
@Stable
|
||||
data class UiState(
|
||||
val isInitializing: Boolean = true,
|
||||
val items: ImmutableList<ItemValue> = persistentListOf(),
|
||||
|
||||
+2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.sensors
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.model.SensorData
|
||||
@@ -56,6 +57,7 @@ class SensorsInfoViewModel(sensorsDataObservable: SensorsDataObservable) : ViewM
|
||||
.map { UiState(isInitializing = false, sensors = it.toImmutableList()) }
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), UiState())
|
||||
|
||||
@Stable
|
||||
data class UiState(
|
||||
val isInitializing: Boolean = true,
|
||||
val sensors: ImmutableList<SensorData> = persistentListOf(),
|
||||
|
||||
+2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.kgurgul.cpuinfo.features.information.storage
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.kgurgul.cpuinfo.domain.invoke
|
||||
@@ -41,6 +42,7 @@ class StorageInfoViewModel(private val storageDataObservable: StorageDataObserva
|
||||
storageDataObservable.invoke()
|
||||
}
|
||||
|
||||
@Stable
|
||||
data class UiState(
|
||||
val isInitializing: Boolean = true,
|
||||
val storageItems: ImmutableList<StorageItem> = persistentListOf(),
|
||||
|
||||
Reference in New Issue
Block a user