Skip to content

Commit

Permalink
Merge pull request #22 from MrRuslanYT/fragmentClose
Browse files Browse the repository at this point in the history
Fix the issue #21
  • Loading branch information
massivemadness committed Jun 17, 2023
2 parents 305ad5b + f733ca6 commit ec095cc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,18 @@ class SwipeBackFragment : Fragment(R.layout.fragment_swipeback), Navigable, Swip
override fun popBackStack(popUpTo: NavBackStackEntry, onScrollFinished: () -> Unit) {
if (popImmediately) {
popImmediately = false
navBackStackAdapter?.pop()
viewPager?.post {
navBackStackAdapter?.pop()
}
onScrollFinished()
return
}
fakeScroll = true
activity?.requestViewLock(true)
viewPager?.fakeDragTo(false, swipeDirection, scrollDuration) {
navBackStackAdapter?.pop()
viewPager?.post {
navBackStackAdapter?.pop()
}
onScrollFinished()
activity?.requestViewLock(false)
fakeScroll = false
Expand Down

0 comments on commit ec095cc

Please sign in to comment.