mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 02:41:52 +01:00
GlobalSearchScreen: Add unique key (#8693)
Avoids crash when an old screen is being replaced by a new one
This commit is contained in:
parent
a3f3f9d562
commit
f05e251991
@ -5,6 +5,7 @@ import androidx.compose.runtime.collectAsState
|
|||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import cafe.adriel.voyager.core.model.rememberScreenModel
|
import cafe.adriel.voyager.core.model.rememberScreenModel
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
|
import cafe.adriel.voyager.core.screen.uniqueScreenKey
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
import eu.kanade.presentation.browse.GlobalSearchScreen
|
import eu.kanade.presentation.browse.GlobalSearchScreen
|
||||||
@ -16,6 +17,8 @@ class GlobalSearchScreen(
|
|||||||
val extensionFilter: String = "",
|
val extensionFilter: String = "",
|
||||||
) : Screen {
|
) : Screen {
|
||||||
|
|
||||||
|
override val key = uniqueScreenKey
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
override fun Content() {
|
override fun Content() {
|
||||||
val navigator = LocalNavigator.currentOrThrow
|
val navigator = LocalNavigator.currentOrThrow
|
||||||
|
Loading…
Reference in New Issue
Block a user