Skip to content

Commit

Permalink
Do Not Show Back Button if Nothing in backstack (#2812)
Browse files Browse the repository at this point in the history
* hide back button

* added todo
  • Loading branch information
anandwana001 authored Nov 8, 2024
1 parent f3ec6d5 commit 9bb3bab
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ class SurveySelectorFragment : AbstractFragment(), BackPressListener {
super.onViewCreated(view, savedInstanceState)
binding.recyclerView.adapter = adapter
getAbstractActivity().setSupportActionBar(binding.toolbar)

// TODO - https://github.com/google/ground-android/issues/2692#issuecomment-2430978043
if (parentFragmentManager.backStackEntryCount > 0) {
getAbstractActivity().supportActionBar?.setDisplayHomeAsUpEnabled(true)
} else {
getAbstractActivity().supportActionBar?.setDisplayHomeAsUpEnabled(false)
}
}

fun showPopupMenu(view: View, surveyId: String) {
Expand Down

0 comments on commit 9bb3bab

Please sign in to comment.