-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
FEAT(client): Adds shortcut to listen to a channel #4636
Conversation
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.
Please ensure that your commit message follows the format specified in our commit guidelines
@timjwkim are you going to update this PR or shall I finish it up for you? |
My apologies, didn't get a chance to see the updates on this thread til now. |
@timjwkim so? |
@Krzmbrzl What can I do to push this change forward? |
When storing shortcuts in the database (which happens only for server-specific shortcuts), the assumption has been that the type of the stored shortcut is always "Whisper/Shout" because up to now this is the only shortcut that can be server-specific. However, this approach is not very future-proof, which is why this commit makes sure that from now on, we explicitly store the type of the shortcut as well.
Up to now the logic for clearing shortcut data upon a change in the shortcut config window was to see if the type() of the current data matches that of the shortcut's default data. However, for user-defined types QVariant::type() always returns QVariant::UserType and thus different user-defined types could not be distinguished. If we instead use QVariant::userType(), this problem does no longer exist.
This introduces a new global shortcut that can be used to start or stop listening to a configured channel. Fixes mumble-voip#4486 Co-Authored-By: timjwkim <timjwkim@umich.edu>
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 took the liberty of finishing this PR myself. In the end it did turn out to be a bit more complicated than originally anticipated due to the way server-specfic global shortcuts were handled up to know.
Added a global shortcut that toggles listening to a specific channel targeted by the client.
Fixes #4486