Fix crash on MigrationListScreen with null accessing a mutableState when it's being put in the background

This commit is contained in:
Cuong-Tran 2024-11-05 10:38:36 +07:00
parent 0e951d8ac1
commit 814e3acd74
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -5,8 +5,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalContext
import cafe.adriel.voyager.core.model.rememberScreenModel
import cafe.adriel.voyager.navigator.LocalNavigator
@ -29,8 +27,7 @@ import tachiyomi.i18n.sy.SYMR
class MigrationListScreen(private val config: MigrationProcedureConfig) : Screen() {
@delegate:Transient
var newSelectedItem by mutableStateOf<Pair<Long, Long>?>(null)
var newSelectedItem: Pair<Long, Long>? = null
@Composable
override fun Content() {