don't hide the action button when showing trending tags (#4910)

This fixes a bug where the action button would be hidden until app
restart when trending tags have been visible once.
This commit is contained in:
Konrad Pozniak 2025-02-07 08:14:14 +01:00 committed by GitHub
commit b7f7b6d6b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,8 +97,6 @@ class TrendingTagsFragment :
processViewState(adapter, trendingState)
}
}
(requireActivity() as? ActionButtonActivity)?.actionButton?.visibility = View.GONE
}
override fun onDestroyView() {
@ -122,7 +120,7 @@ class TrendingTagsFragment :
}
private fun setupRecyclerView(adapter: TrendingTagsAdapter) {
binding.recyclerView.ensureBottomPadding()
binding.recyclerView.ensureBottomPadding(fab = actionButtonPresent())
val columnCount =
requireContext().resources.getInteger(R.integer.trending_column_count)
@ -220,7 +218,7 @@ class TrendingTagsFragment :
}
private fun actionButtonPresent(): Boolean {
return activity is ActionButtonActivity
return (activity as? ActionButtonActivity?)?.actionButton != null
}
private var talkBackWasEnabled = false
@ -236,11 +234,6 @@ class TrendingTagsFragment :
val adapter = requireNotNull(this.adapter)
adapter.notifyItemRangeChanged(0, adapter.itemCount)
}
if (actionButtonPresent()) {
val composeButton = (activity as ActionButtonActivity).actionButton
composeButton?.hide()
}
}
override fun onReselect() {