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
1 changed files with 3 additions and 0 deletions

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()
}
}