feat: setHighlightSounds & openSubscriptionPage split hotkeys (#5856)

This commit is contained in:
Brian
2025-03-03 14:20:09 -05:00
committed by GitHub
parent 34429671ba
commit 8dd19d2d5e
7 changed files with 92 additions and 13 deletions
+14 -2
View File
@@ -537,7 +537,9 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
h->getDisplaySequence(HotkeyCategory::Split, "openViewerList"));
}
moreMenu->addAction("Subscribe", this->split_, &Split::openSubPage);
moreMenu->addAction("Subscribe", this->split_, &Split::openSubPage,
h->getDisplaySequence(HotkeyCategory::Split,
"openSubscriptionPage"));
auto *action = new QAction(this);
action->setText("Notify when live");
@@ -569,9 +571,19 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
if (twitchChannel)
{
auto *action = new QAction(this);
action->setText("Mute highlight sound");
action->setText("Mute highlight sounds");
action->setCheckable(true);
auto notifySeq = h->getDisplaySequence(
HotkeyCategory::Split, "setHighlightSounds", {{"toggle"}});
if (notifySeq.isEmpty())
{
notifySeq = h->getDisplaySequence(HotkeyCategory::Split,
"setHighlightSounds",
{std::vector<QString>()});
}
action->setShortcut(notifySeq);
QObject::connect(moreMenu, &QMenu::aboutToShow, this, [action, this]() {
action->setChecked(getSettings()->isMutedChannel(
this->split_->getChannel()->getName()));