fix: Setup compose button when creating MainActivity (#589)
The compose button isn't initially working on `MainActivity`. It is only properly setup after changing tabs. Fix by calling `MainActivity.refreshComposeButtonState(TabViewData)` on creation.
This commit is contained in:
parent
6bef6f2fae
commit
6507e2bec1
|
@ -962,11 +962,13 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
|
|||
activeTabLayout.addOnTabSelectedListener(it)
|
||||
}
|
||||
|
||||
supportActionBar?.title = tabs[position].title(this@MainActivity)
|
||||
binding.mainToolbar.title = tabs[position].title(this@MainActivity)
|
||||
binding.mainToolbar.setOnClickListener {
|
||||
(tabAdapter.getFragment(activeTabLayout.selectedTabPosition) as? ReselectableFragment)?.onReselect()
|
||||
}
|
||||
|
||||
refreshComposeButtonState(tabs[position])
|
||||
|
||||
updateProfiles()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue