remove unnecessary test of ViewPager position, since the callback will only be enabled if the position is not 0.
This commit is contained in:
parent
05b7358c04
commit
3e8484f928
|
@ -196,9 +196,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
|||
|
||||
private val onBackPressedCallback = object : OnBackPressedCallback(false) {
|
||||
override fun handleOnBackPressed() {
|
||||
if (binding.viewPager.currentItem != 0) {
|
||||
binding.viewPager.currentItem = 0
|
||||
}
|
||||
binding.viewPager.currentItem = 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue