Adds option to mute ping sound for specific channels (#990)
Co-Authored-By: hemirt <hemirt@hemirt.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/moderationactions/ModerationActions.hpp"
|
||||
#include "controllers/notifications/NotificationController.hpp"
|
||||
#include "controllers/pings/PingController.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/Resources.hpp"
|
||||
@@ -297,6 +298,23 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
||||
|
||||
moreMenu->addAction(action);
|
||||
|
||||
{
|
||||
auto action = new QAction(this);
|
||||
action->setText("Mute highlight sound");
|
||||
action->setCheckable(true);
|
||||
|
||||
QObject::connect(moreMenu, &QMenu::aboutToShow, this, [action, this]() {
|
||||
action->setChecked(getApp()->pings->isMuted(
|
||||
this->split_->getChannel()->getName()));
|
||||
});
|
||||
action->connect(action, &QAction::triggered, this, [this]() {
|
||||
getApp()->pings->toggleMuteChannel(
|
||||
this->split_->getChannel()->getName());
|
||||
});
|
||||
|
||||
moreMenu->addAction(action);
|
||||
}
|
||||
|
||||
moreMenu->addSeparator();
|
||||
moreMenu->addAction("Reconnect", this, SLOT(reconnect()));
|
||||
moreMenu->addAction("Reload channel emotes", this,
|
||||
|
||||
Reference in New Issue
Block a user