Use unique keys for all screens to avoid crashes

Fixes #9008
Fixes #9110
This commit is contained in:
arkon
2023-02-19 11:09:41 -05:00
parent 727399611d
commit 3f7911235c
26 changed files with 73 additions and 83 deletions
@@ -3,10 +3,9 @@ package eu.kanade.tachiyomi.ui.webview
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
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.core.navigation.Screen
import eu.kanade.presentation.util.AssistContentScreen
import eu.kanade.presentation.webview.WebViewScreenContent
@@ -14,12 +13,10 @@ class WebViewScreen(
private val url: String,
private val initialTitle: String? = null,
private val sourceId: Long? = null,
) : Screen, AssistContentScreen {
) : Screen(), AssistContentScreen {
private var assistUrl: String? = null
override val key = uniqueScreenKey
override fun onProvideAssistUrl() = assistUrl
@Composable