Skip to content
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

Switch instead of add if tab already exists #7

Merged
merged 1 commit into from
May 4, 2022

Conversation

justjosias
Copy link
Contributor

Adds a new switch that switches to a tab by name, and add_or_switch that adds or switches whenever appropriate. It also changes the command processor to use add_or_switch for information and channel tabs.

This should make tabs slightly less confusing to use.

The tabs are still prepared before checking if it already exists. This might not be your preferred behavior, and can be refactored if so desired.

Resolves part of #1

@bkolobara
Copy link
Contributor

Thanks for the PR @justjosias!

@bkolobara bkolobara merged commit 22e7975 into lunatic-solutions:main May 4, 2022
@justjosias justjosias deleted the switch_if_exists branch May 4, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants