show actual hashtags in title of hashtag tab (#4868)

Instead of just "Hashtags".

Actually, this was a bug. The code to generate the correct title is
already here, but it wasn't called. 🤷

closes https://github.com/tuskyapp/Tusky/issues/4867
This commit is contained in:
Konrad Pozniak 2025-01-14 19:29:35 +01:00 committed by GitHub
commit fcc8dc1e61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -886,10 +886,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
tabLayoutMediator = TabLayoutMediator(activeTabLayout, binding.viewPager, true) {
tab: TabLayout.Tab, position: Int ->
tab.icon = AppCompatResources.getDrawable(this@MainActivity, tabs[position].icon)
tab.contentDescription = when (tabs[position].id) {
LIST -> tabs[position].arguments[1]
else -> getString(tabs[position].text)
}
tab.contentDescription = tabs[position].title(this)
if (tabs[position].id == DIRECT) {
val badge = tab.orCreateBadge
badge.isVisible = activeAccount.hasDirectMessageBadge