diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index c53d0285a..58fd15c23 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -636,6 +636,16 @@ void Split::showViewerList() viewerDock->activateWindow(); } +void Split::openSubPage() +{ + ChannelPtr channel = this->getChannel(); + + if (auto twitchChannel = dynamic_cast(channel.get())) + { + QDesktopServices::openUrl(twitchChannel->subscriptionUrl()); + } +} + void Split::copyToClipboard() { QApplication::clipboard()->setText(this->view_->getSelectedText()); diff --git a/src/widgets/splits/Split.hpp b/src/widgets/splits/Split.hpp index 95db30155..edfca352e 100644 --- a/src/widgets/splits/Split.hpp +++ b/src/widgets/splits/Split.hpp @@ -129,6 +129,7 @@ public slots: void copyToClipboard(); void showSearch(); void showViewerList(); + void openSubPage(); void reloadChannelAndSubscriberEmotes(); }; diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 3754ae967..c63f373df 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -284,9 +284,12 @@ std::unique_ptr SplitHeader::createMainMenu() // sub menu auto moreMenu = new QMenu("More", this); + moreMenu->addAction("Show viewer list", this->split_, &Split::showViewerList); + moreMenu->addAction("Subscribe", this->split_, &Split::openSubPage); + auto action = new QAction(this); action->setText("Notify when live"); action->setCheckable(true);