From 6263817bb4ab7494143cbd901d829f805e71f0bd Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 8 Jan 2023 22:16:40 -0500 Subject: [PATCH] Avoid crash if multiple instances of ClearDatabaseScreen opened Fixes #8851 I guess we might want to do this for all screens? Maybe? --- .../presentation/more/settings/screen/ClearDatabaseScreen.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt index 394aa1dd7..34b0788d3 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt @@ -31,6 +31,7 @@ import cafe.adriel.voyager.core.model.StateScreenModel import cafe.adriel.voyager.core.model.coroutineScope 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.domain.source.interactor.GetSourcesWithNonLibraryManga @@ -58,6 +59,8 @@ import uy.kohesive.injekt.api.get class ClearDatabaseScreen : Screen { + override val key = uniqueScreenKey + @Composable override fun Content() { val context = LocalContext.current