mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Remove StateFlow.value direct access from compose
This commit is contained in:
parent
7c6d4c5a2b
commit
7ec0b26d48
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,6 @@ import androidx.compose.runtime.LaunchedEffect
|
|||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.livedata.observeAsState
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
|
|
@ -88,7 +87,8 @@ class WebReaderLoadingContainerActivity : ComponentActivity() {
|
|||
.background(color = if (isSystemInDarkTheme()) Color.Black else Color.White)
|
||||
.imePadding()
|
||||
) {
|
||||
if (viewModel.hasFetchError.value == true) {
|
||||
val hasFetchError by viewModel.hasFetchError.collectAsStateWithLifecycle()
|
||||
if (hasFetchError) {
|
||||
Text(stringResource(R.string.web_reader_loading_container_error_msg))
|
||||
} else {
|
||||
WebReaderLoadingContainer(
|
||||
|
|
|
|||
Loading…
Reference in a new issue