Skip to content
Merged
Changes from 2 commits
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
2 changes: 2 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ impl App {
}

pub fn pop_navigation_stack(&mut self) -> Option<Route> {
self.navigation_stack.dedup_by(|a, b| a.id == b.id);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be just a bit nicer to do this in push_navigation_stack, assuming that that is the only place where the stack is stack is grown. In that case, it could possibly be just an if statement checking whether the current id is the same as the id at the top of the stack.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for looking at this 👍 moved to push_navigation_stack and changed to if statement.


if self.navigation_stack.len() == 1 {
None
} else {
Expand Down