Hello, great library! I would like to be able to suppress intermediate transitions when using pop(to:). I made a local change that seems to work (below), but may not be the best solution. If you prefer I can open a PR.
private var showTransition: Bool = true
var paths: [Path<T>] = [] {
didSet {
if showTransition {
updateViewState()
}
}
}
public func popTo(_ route: T, inclusive: Bool = false, showIntermediateTransitions: Bool = false) {
...
if !showIntermediateTransitions {
// remove intermediate paths supressing transition animations
var numToPop = (found..<paths.endIndex).count - 1
logger.log("UIPilot - Popping \(numToPop + 1) routes")
showTransition = false
paths.removeLast(numToPop)
showTransition = true
// pop the final path with a transition animation
pop()
} else {
// The original code: pop showing all transitions
for _ in found..<paths.count {
logger.log("UIPilot - Route \(route) Popped.")
pop()
}
}
...
Hello, great library! I would like to be able to suppress intermediate transitions when using pop(to:). I made a local change that seems to work (below), but may not be the best solution. If you prefer I can open a PR.