fix MainActivity title when coming from a notification (#1844)
This commit is contained in:
parent
b5bf78a19e
commit
56f4f8a38d
1 changed files with 4 additions and 3 deletions
|
@ -488,8 +488,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||||
val pageMargin = resources.getDimensionPixelSize(R.dimen.tab_page_margin)
|
val pageMargin = resources.getDimensionPixelSize(R.dimen.tab_page_margin)
|
||||||
viewPager.setPageTransformer(MarginPageTransformer(pageMargin))
|
viewPager.setPageTransformer(MarginPageTransformer(pageMargin))
|
||||||
|
|
||||||
val uswSwipeForTabs = preferences.getBoolean("enableSwipeForTabs", true)
|
val enableSwipeForTabs = preferences.getBoolean("enableSwipeForTabs", true)
|
||||||
viewPager.isUserInputEnabled = uswSwipeForTabs
|
viewPager.isUserInputEnabled = enableSwipeForTabs
|
||||||
|
|
||||||
onTabSelectedListener?.let {
|
onTabSelectedListener?.let {
|
||||||
activeTabLayout.removeOnTabSelectedListener(it)
|
activeTabLayout.removeOnTabSelectedListener(it)
|
||||||
|
@ -516,7 +516,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||||
activeTabLayout.addOnTabSelectedListener(it)
|
activeTabLayout.addOnTabSelectedListener(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
mainToolbar.title = tabs[0].title(this@MainActivity)
|
val activeTabPosition = if (selectNotificationTab) notificationTabPosition else 0
|
||||||
|
mainToolbar.title = tabs[activeTabPosition].title(this@MainActivity)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue