Skip to content

Commit c981121

Browse files
authored
Fix NavigationStackController pop animations (pointfreeco#222)
Fixed popping view controllers by modifying the path is not animating correctly due to a logic error.
1 parent d7bd37c commit c981121

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/UIKitNavigation/Navigation/NavigationStackController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
} else if difference.count == 1,
9191
case .remove(newPath.count, _, nil) = difference.first
9292
{
93-
popViewController(animated: transaction.uiKit.disablesAnimations)
93+
popViewController(animated: !transaction.uiKit.disablesAnimations)
9494
} else if difference.insertions.isEmpty, newPath.isEmpty {
95-
popToRootViewController(animated: transaction.uiKit.disablesAnimations)
95+
popToRootViewController(animated: !transaction.uiKit.disablesAnimations)
9696
} else if difference.insertions.isEmpty,
9797
case let offsets = difference.removals.map(\.offset),
9898
let first = offsets.first,

0 commit comments

Comments
 (0)