diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt index 8ffc0e076..25b5ca763 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt @@ -54,6 +54,8 @@ import uy.kohesive.injekt.api.get object SettingsDataScreen : SearchableSettings { + val restorePreferenceKeyString = MR.strings.label_backup + @ReadOnlyComposable @Composable override fun getTitleRes() = MR.strings.label_data_storage @@ -143,7 +145,7 @@ object SettingsDataScreen : SearchableSettings { preferenceItems = listOf( // Manual actions Preference.PreferenceItem.CustomPreference( - title = stringResource(MR.strings.label_backup), + title = stringResource(restorePreferenceKeyString), ) { BasePreferenceWidget( subcomponent = { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/OnboardingScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/OnboardingScreen.kt index bc211445e..a624c4730 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/OnboardingScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/OnboardingScreen.kt @@ -8,8 +8,11 @@ import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.domain.base.BasePreferences import eu.kanade.presentation.more.onboarding.OnboardingScreen +import eu.kanade.presentation.more.settings.screen.SearchableSettings +import eu.kanade.presentation.more.settings.screen.SettingsDataScreen import eu.kanade.presentation.util.Screen import eu.kanade.tachiyomi.ui.setting.SettingsScreen +import tachiyomi.presentation.core.i18n.stringResource import tachiyomi.presentation.core.util.collectAsState import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get @@ -28,6 +31,8 @@ class OnboardingScreen : Screen() { navigator.pop() } + val restoreSettingKey = stringResource(SettingsDataScreen.restorePreferenceKeyString) + BackHandler( enabled = !shownOnboardingFlow, onBack = { @@ -39,6 +44,7 @@ class OnboardingScreen : Screen() { onComplete = finishOnboarding, onRestoreBackup = { finishOnboarding() + SearchableSettings.highlightKey = restoreSettingKey navigator.push(SettingsScreen(SettingsScreen.Destination.DataAndStorage)) }, )