mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 02:01:48 +01:00
Highlight restore backup setting when navigating from onboarding step
This commit is contained in:
parent
19f0175a56
commit
93cbeca5c0
@ -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 = {
|
||||
|
@ -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))
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user