-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pressing d
twice requires q
twice to exit
#826
Conversation
src/app.rs
Outdated
@@ -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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good!
Thank you 👏
@all-contributors please add @cobbinma for code |
I've put up a pull request to add @cobbinma! 🎉 |
Hi guys 👋,
First attempt at a PR here and attempted to resolve issue
Did this by
dedup
ing any routes on the navigation stack with matching ids.The device selector popup can be opened multiple times by pressing
d
more than once.To get back to the main menu, each of these needs to be closed separately by pressing
q
the same number of times.It would be nicer if pressing
q
only once always goes back to the main menu.E.g, actual behavior:
press
d
press
d
press
q
You're seeing the device selector
expected behavior:
press
d
press
d
press
q
You're seeing the main menu