Add an "Open in browser" option to whisper split (#1828)
This commit is contained in:
@@ -543,6 +543,13 @@ void Split::openInBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
void Split::openWhispersInBrowser()
|
||||
{
|
||||
auto userName = getApp()->accounts->twitch.getCurrent()->getUserName();
|
||||
QDesktopServices::openUrl("https://twitch.tv/popout/moderator/" + userName +
|
||||
"/whispers");
|
||||
}
|
||||
|
||||
void Split::openBrowserPlayer()
|
||||
{
|
||||
ChannelPtr channel = this->getChannel();
|
||||
|
||||
@@ -127,6 +127,7 @@ public slots:
|
||||
void popup();
|
||||
void clear();
|
||||
void openInBrowser();
|
||||
void openWhispersInBrowser();
|
||||
void openBrowserPlayer();
|
||||
void openInStreamlink();
|
||||
void openWithCustomScheme();
|
||||
|
||||
@@ -316,6 +316,13 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
if (this->split_->getChannel()->getType() == Channel::Type::TwitchWhispers)
|
||||
{
|
||||
menu->addAction(OPEN_IN_BROWSER, this->split_,
|
||||
&Split::openWhispersInBrowser);
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
{
|
||||
// "How to..." sub menu
|
||||
auto subMenu = new QMenu("How to...", this);
|
||||
|
||||
Reference in New Issue
Block a user