From f05e251991c0f89c9f275acc4d6c29a4fc856913 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Wed, 7 Dec 2022 20:27:54 +0700 Subject: [PATCH] GlobalSearchScreen: Add unique key (#8693) Avoids crash when an old screen is being replaced by a new one --- .../ui/browse/source/globalsearch/GlobalSearchScreen.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt index 0e9f4eff4..368806bb2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt @@ -5,6 +5,7 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import cafe.adriel.voyager.core.model.rememberScreenModel 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.currentOrThrow import eu.kanade.presentation.browse.GlobalSearchScreen @@ -16,6 +17,8 @@ class GlobalSearchScreen( val extensionFilter: String = "", ) : Screen { + override val key = uniqueScreenKey + @Composable override fun Content() { val navigator = LocalNavigator.currentOrThrow