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

Hide the Usercard button in the User Info Popup in special channels #4972

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

Mm2PL
Copy link
Collaborator

@Mm2PL Mm2PL commented Nov 19, 2023

Description

Closes #550.

Comment on lines 746 to 748
if (auto *tc = dynamic_cast<TwitchChannel *>(this->channel_.get());
tc == nullptr)
{
Copy link
Contributor

Choose a reason for hiding this comment

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

this will also hide button from /mentions or search where it works as expected,
could be changed to check if channel type is TwitchWhispers or TwitchLive

src/widgets/dialogs/UserInfoPopup.hpp Outdated Show resolved Hide resolved
@Mm2PL
Copy link
Collaborator Author

Mm2PL commented Dec 2, 2023

The getType approach has at least one false positive (/usercard name in /mentions yields a usercard without a valid context channel). I decided it's better to have FPs than false negatives here.

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

I've tested this & made sure it opened as expected in:

  • Normal Twitch channels - it correctly shows the button
  • /mentions - it correctly shows the button & uses the channel the message was originally sent in
  • /whispers - it correctly hides the button, previously it would show the button & take me to https://www.twitch.tv/popout//whispers/viewercard/testaccount_420
  • /automod - it currectly shows the button & uses the channel the offending message was sent in
  • /live - it correctly hides the button, previously it would show the button & take me to https://www.twitch.tv/popout//live/viewercard/pajlada

I have not tried /watching since I'm on Linux btw

@pajlada pajlada changed the title Hide the Usercard button in the User Info Popup when in special channels Hide the Usercard button in the User Info Popup in special channels Dec 9, 2023
@pajlada pajlada enabled auto-merge (squash) December 9, 2023 12:02
@pajlada pajlada merged commit 401e097 into master Dec 9, 2023
18 of 20 checks passed
@pajlada pajlada deleted the feature/hide_usercard_button_when_invalid branch December 9, 2023 12:21
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.

Channel-specific user info popup actions don't work in special channels
3 participants