Make tapping the main toolbar scroll to the top of the timeline. #1899 (#2045)

This commit is contained in:
Levi Bard 2021-01-15 21:23:02 +01:00 committed by GitHub
parent 4c7d09b1e3
commit 5fbd459aed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -554,6 +554,9 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
val activeTabPosition = if (selectNotificationTab) notificationTabPosition else 0
mainToolbar.title = tabs[activeTabPosition].title(this@MainActivity)
mainToolbar.setOnClickListener {
(adapter.getFragment(activeTabLayout.selectedTabPosition) as? ReselectableFragment)?.onReselect()
}
}