mirror of
git://jb55.com/damus
synced 2024-09-30 00:40:45 +00:00
nav: fix pushing duplicate routes
Skip push if matches top route. Fixes: https://github.com/damus-io/damus/issues/104 Closes: https://github.com/damus-io/damus/pull/1625 Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
06eb9d4a0e
commit
7c98489904
@ -218,6 +218,9 @@ class NavigationCoordinator: ObservableObject {
|
||||
@Published var path = [Route]()
|
||||
|
||||
func push(route: Route) {
|
||||
guard route != path.last else {
|
||||
return
|
||||
}
|
||||
path.append(route)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user