Option to hide system moderation messages (#1066)

This commit is contained in:
apa420 2019-05-10 23:16:34 +02:00 committed by pajlada
parent 3ea496a99b
commit 834b1f3c53
3 changed files with 9 additions and 0 deletions

View file

@ -121,6 +121,13 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags flags)
{ {
continue; continue;
} }
if (getSettings()->hideModerationActions &&
this->message_->flags.has(MessageFlag::Timeout))
{
continue;
}
element->addToContainer(*this->container_, flags); element->addToContainer(*this->container_, flags);
} }

View file

@ -39,6 +39,7 @@ public:
false}; false};
BoolSetting compactEmotes = {"/appearance/messages/compactEmotes", true}; BoolSetting compactEmotes = {"/appearance/messages/compactEmotes", true};
BoolSetting hideModerated = {"/appearance/messages/hideModerated", false}; BoolSetting hideModerated = {"/appearance/messages/hideModerated", false};
BoolSetting hideModerationActions = {"/appearance/messages/hideModerationActions", false};
// BoolSetting collapseLongMessages = // BoolSetting collapseLongMessages =
// {"/appearance/messages/collapseLongMessages", false}; // {"/appearance/messages/collapseLongMessages", false};

View file

@ -214,6 +214,7 @@ void GeneralPage::initLayout(SettingsLayout &layout)
// layout.addCheckbox("Mark last message you read"); // layout.addCheckbox("Mark last message you read");
// layout.addDropdown("Last read message style", {"Default"}); // layout.addDropdown("Last read message style", {"Default"});
layout.addCheckbox("Hide moderated messages", s.hideModerated); layout.addCheckbox("Hide moderated messages", s.hideModerated);
layout.addCheckbox("Hide moderation messages", s.hideModerationActions);
layout.addTitle("Emotes"); layout.addTitle("Emotes");
layout.addDropdown<float>( layout.addDropdown<float>(