Skip to content

Commit

Permalink
Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Jul 25, 2024
1 parent 1c7e9bc commit a2f44b6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Rideau/Core/RideauHostingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ final class RideauHostingView: RideauTouchThroughView {
let newresolvedState = resolve(configuration: self.configuration)
resolvedState = newresolvedState

hasTakenAlongsideAnimators = false
prepareAlongsideAnimators()

if let initial = newresolvedState.resolvedSnapPoints.last {
updateLayout(target: initial, resolvedState: newresolvedState)
} else {
Expand All @@ -333,8 +336,12 @@ final class RideauHostingView: RideauTouchThroughView {
// It had to update layout, but configuration for layot does not have changes.
return
}

resolvedState = newresolvedState

hasTakenAlongsideAnimators = false
prepareAlongsideAnimators()

guard
let snapPoint = newresolvedState.resolvedSnapPoint(by: currentSnapPoint.source) ?? newresolvedState.resolvedSnapPoints.first
else {
Expand All @@ -355,10 +362,6 @@ final class RideauHostingView: RideauTouchThroughView {

preventCurrentAnimations: do {

if #available(iOS 11, *) {
prepareAlongsideAnimators()
}

animatorStore.allAnimators()
.forEach {
$0.pauseAnimation()
Expand Down Expand Up @@ -486,10 +489,6 @@ final class RideauHostingView: RideauTouchThroughView {
containerDraggingAnimator?.pauseAnimation()
containerDraggingAnimator?.stopAnimation(true)

if #available(iOS 11, *) {
prepareAlongsideAnimators()
}

let targetScrollView: UIScrollView? = {

guard let gesture = gesture as? RideauViewDragGestureRecognizer else {
Expand Down

0 comments on commit a2f44b6

Please sign in to comment.