Simplify navigation in SettingsListFragment

This commit is contained in:
cketti 2024-01-23 15:23:00 +01:00
parent 3fdd1b7963
commit 84b787180f
2 changed files with 4 additions and 10 deletions

View file

@ -150,13 +150,7 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
when (item) {
is AccountItem -> launchAccountSettings(item.account)
is UrlActionItem -> openUrl(item.url)
is SettingsActionItem -> {
if (item.navigationAction == R.id.action_settingsListScreen_to_addAccountScreen) {
FeatureLauncherActivity.launchSetupAccount(requireActivity())
} else {
findNavController().navigate(item.navigationAction)
}
}
is SettingsActionItem -> findNavController().navigate(item.navigationAction)
}
}

View file

@ -50,9 +50,9 @@
<activity
android:id="@+id/addAccountScreen"
android:name="com.fsck.k9.activity.setup.AccountSetupBasics"
android:label="@string/account_setup_basics_title"
tools:layout="@layout/account_setup_basics"/>
android:name="app.k9mail.feature.launcher.FeatureLauncherActivity"
android:data="app://account/setup"
android:label="@string/account_setup_basics_title" />
<fragment
android:id="@+id/settingsExportScreen"