mirror of
https://github.com/Michatec/michas-droid.git
synced 2026-05-30 18:02:43 +02:00
Fix removing update notification
This commit is contained in:
@@ -468,8 +468,12 @@ class TabsFragment: ScreenFragment() {
|
||||
}
|
||||
|
||||
override fun onPageScrollStateChanged(state: Int) {
|
||||
layout!!.categoryChange.isEnabled = state != ViewPager2.SCROLL_STATE_DRAGGING &&
|
||||
ProductsFragment.Source.values()[viewPager!!.currentItem].categories
|
||||
val source = ProductsFragment.Source.values()[viewPager!!.currentItem]
|
||||
layout!!.categoryChange.isEnabled = state != ViewPager2.SCROLL_STATE_DRAGGING && source.categories
|
||||
if (state == ViewPager2.SCROLL_STATE_IDLE) {
|
||||
// onPageSelected can be called earlier than fragments created
|
||||
updateUpdateNotificationBlocker(source)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user