-
Notifications
You must be signed in to change notification settings - Fork 200
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
Going back to the menu #153
base: master
Are you sure you want to change the base?
Conversation
…e to add it. Now you can configure all the app without relaunching it.
Please remove this. This is done intentionally to avoid confusion of users ("I'm on visionary, why doesn't it support this plan?"). Not everyone knows that they are the same. As you've seen, it sets the same value anyway, it's just to not cause confusion. |
Sorry, I should not have changed this. :) |
I did not take into account the init option, good catch ! 😅 I added an 'Init' boolean argument to the 3 functions run during initialisation to display or not, and enable / disable the menu option. I should have thought of this before my pull request. I hope it's ok now ? |
Instead of adding a new boolean, wouldn't it make more sense to utilize |
Good question. I don't think so since the relation between write and init mode isn't direct. It could be a hack tough, but adding a boolean and gaining in readability is a good compromise I think. But it's your software, so if you want me to remove it no problem. |
I'm actually thinking about whether it would be better to rename it to init, as that's actually what matters. It just doesn't make sense to have 2 booleans that are always the same in the 2 different cases. Let me submit a PR to your branch later. :) |
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.
@Y0lan please take a look at these changes and tell me what you think!
Also, please pull them and try them out. Try to break them to find bugs :P
protonvpn_cli/cli.py
Outdated
configure_cli() | ||
return |
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've replaced all "configure_cli()" calls with return, as to not make the process go deeper and deeper.
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.
Perfect, thanks !
I'll test it tomorrow ! |
added a "go back to menu entry" to all the entry where it made sense to add it. Now you can configure all the app without relaunching it.
I also cleaned up some things that I can easily revert back if needed.