jessesquires/PresenterKit

Check `context.isCancelled` in navigation completion blocks

Closed this issue · 0 comments

Pretty sure we should check context.isCancelled here:
https://github.com/jessesquires/PresenterKit/blob/develop/Source/NavigationControllerExtensions.swift#L45

coordinator.animate(alongsideTransition: nil) { context in
            guard !context.isCancelled else { return }
            completion()
        }

If the transition is cancelled (possible if interactively pushing/popping), then we don't want to call the completion block.