Skip to content

Commit

Permalink
Merge pull request #56 from PhilipDukhov/public_current_stack_index
Browse files Browse the repository at this point in the history
Make current stack index info public
  • Loading branch information
frzi authored Apr 12, 2022
2 parents 97ff3ec + 0ae3f3f commit cd8c2bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Navigator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public final class Navigator: ObservableObject {
public var canGoForward: Bool {
!forwardStack.isEmpty
}

public var currentStackIndex: Int {
historyStack.count - 1
}

// MARK: Methods.
/// Navigate to a new location.
Expand Down

0 comments on commit cd8c2bb

Please sign in to comment.