Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove return
  • Loading branch information
cobbinma committed Jul 6, 2021
commit 9e5e4b17f9565626ae9cad33a34962f88a975e96
13 changes: 6 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,19 +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) {
if self
if !self
.navigation_stack
.last()
.map(|last_route_id| last_route_id.id == next_route_id)
.unwrap_or(false)
{
return;
self.navigation_stack.push(Route {
id: next_route_id,
active_block: next_active_block,
hovered_block: next_active_block,
});
}
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<Route> {
Expand Down