diff --git a/src/app.rs b/src/app.rs index 15770c96..2a10df79 100644 --- a/src/app.rs +++ b/src/app.rs @@ -626,11 +626,18 @@ impl App { // The navigation_stack actually only controls the large block to the right of `library` and // `playlists` pub fn push_navigation_stack(&mut self, next_route_id: RouteId, next_active_block: ActiveBlock) { - self.navigation_stack.push(Route { - id: next_route_id, - active_block: next_active_block, - hovered_block: next_active_block, - }); + if !self + .navigation_stack + .last() + .map(|last_route| last_route.id == next_route_id) + .unwrap_or(false) + { + self.navigation_stack.push(Route { + id: next_route_id, + active_block: next_active_block, + hovered_block: next_active_block, + }); + } } pub fn pop_navigation_stack(&mut self) -> Option {