Setting for disabling /mentions tab highlight (#1994)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -805,7 +805,10 @@ void ChannelView::messageAppended(MessagePtr &message,
|
||||
{
|
||||
if (messageFlags->has(MessageFlag::Highlighted) &&
|
||||
messageFlags->has(MessageFlag::ShowInMentions) &&
|
||||
!messageFlags->has(MessageFlag::Subscription))
|
||||
!messageFlags->has(MessageFlag::Subscription) &&
|
||||
(getSettings()->highlightMentions ||
|
||||
this->channel_->getType() != Channel::Type::TwitchMentions))
|
||||
|
||||
{
|
||||
this->tabHighlightRequested.invoke(HighlightState::Highlighted);
|
||||
}
|
||||
|
||||
@@ -625,6 +625,8 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
layout.addCheckbox("Combine multiple bit tips into one", s.stackBits);
|
||||
layout.addCheckbox("Ask for confirmation when uploading an image",
|
||||
s.askOnImageUpload);
|
||||
layout.addCheckbox("Messages in /mentions highlights tab",
|
||||
s.highlightMentions);
|
||||
|
||||
layout.addStretch();
|
||||
|
||||
|
||||
@@ -425,6 +425,23 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
||||
this->split_->setModerationMode(!this->split_->getModerationMode());
|
||||
});
|
||||
|
||||
if (this->split_->getChannel()->getType() == Channel::Type::TwitchMentions)
|
||||
{
|
||||
auto action = new QAction(this);
|
||||
action->setText("Enable /mention tab highlights");
|
||||
action->setCheckable(true);
|
||||
|
||||
QObject::connect(moreMenu, &QMenu::aboutToShow, this, [action, this]() {
|
||||
action->setChecked(getSettings()->highlightMentions);
|
||||
});
|
||||
action->connect(action, &QAction::triggered, this, [this]() {
|
||||
getSettings()->highlightMentions =
|
||||
!getSettings()->highlightMentions;
|
||||
});
|
||||
|
||||
moreMenu->addAction(action);
|
||||
}
|
||||
|
||||
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
|
||||
{
|
||||
moreMenu->addAction("Show viewer list", this->split_,
|
||||
|
||||
Reference in New Issue
Block a user