Skip to content

Commit

Permalink
Merge pull request #7198 from thundernest/fix_settings_navigation
Browse files Browse the repository at this point in the history
Fix navigation in settings list screen
  • Loading branch information
wmontwe authored Sep 27, 2023
2 parents 72ab8f6 + be2c35f commit 9f12cb4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.widget.Toast
import androidx.annotation.AttrRes
import androidx.annotation.IdRes
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
Expand Down Expand Up @@ -149,10 +150,10 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
is AccountItem -> launchAccountSettings(item.account)
is UrlActionItem -> openUrl(item.url)
is SettingsActionItem -> {
if (
item.navigationAction == R.id.action_settingsListScreen_to_addAccountScreen
) {
if (item.navigationAction == R.id.action_settingsListScreen_to_addAccountScreen) {
FeatureLauncherActivity.launchSetupAccount(requireActivity())
} else {
findNavController().navigate(item.navigationAction)
}
}
}
Expand Down

0 comments on commit 9f12cb4

Please sign in to comment.