From d85d9d49109243d0b9aeae4db8f5921e0698c8af Mon Sep 17 00:00:00 2001 From: badoge <18620902+badoge@users.noreply.github.com> Date: Sat, 30 Apr 2022 03:29:14 -0700 Subject: [PATCH] Add option to open a user's chat in a new tab from the usercard avatar context menu (#3625) Co-authored-by: Rasmus Karlsson --- CHANGELOG.md | 1 + src/widgets/dialogs/UserInfoPopup.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29918b7b..66152153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Minor: Fixed being unable to load Twitch Usercards from the `/mentions` tab. (#3623) - Minor: Add information about the user's operating system in the About page. (#3663) - Minor: Added chatter count for each category in viewer list. (#3683) +- Minor: Added option to open a user's chat in a new tab from the usercard profile picture context menu. (#3625) - Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646) - Bugfix: Fixed certain settings dialogs appearing behind the main window, when `Always on top` was used. (#3679) - Bugfix: Fixed an issue in the emote picker where an emotes tooltip would not properly disappear. (#3686) diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index a70494b9..b2c8bd4f 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -305,6 +305,19 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent) loginName.toLower())); }); + menu->addAction( + "Open channel in a new tab", this, [loginName] { + ChannelPtr channel = + getApp()->twitch->getOrAddChannel( + loginName); + auto &nb = getApp() + ->windows->getMainWindow() + .getNotebook(); + SplitContainer *container = nb.addPage(true); + Split *split = new Split(container); + split->setChannel(channel); + container->appendSplit(split); + }); menu->popup(QCursor::pos()); menu->raise(); }