Add option to open a user's chat in a new tab from the usercard avatar context menu (#3625)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
badoge 2022-04-30 03:29:14 -07:00 committed by GitHub
parent b825493d6e
commit d85d9d4910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -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)

View file

@ -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();
}