Option to hide moderated messages (timed out messages)

This commit is contained in:
apa420 2019-04-10 15:32:18 +02:00
parent 3f41dfeff9
commit 562bdae09f
3 changed files with 8 additions and 1 deletions

View file

@ -127,7 +127,11 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
for (const auto &element : this->message_->elements)
{
element->addToContainer(*this->container_, _flags);
if (!(getSettings()->removeModerated &&
this->message_->flags.has(MessageFlag::Disabled)))
{
element->addToContainer(*this->container_, _flags);
}
}
if (addTest)

View file

@ -41,6 +41,8 @@ public:
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
false};
BoolSetting compactEmotes = {"/appearance/messages/compactEmotes", true};
BoolSetting removeModerated = {"/appearance/messages/removeModerated",
false};
// BoolSetting collapseLongMessages =
// {"/appearance/messages/collapseLongMessages", false};

View file

@ -210,6 +210,7 @@ void GeneralPage::initLayout(SettingsLayout &layout)
layout.addCheckbox("Alternate background color", s.alternateMessages);
// layout.addCheckbox("Mark last message you read");
// layout.addDropdown("Last read message style", {"Default"});
layout.addCheckbox("Remove moderated messages", s.removeModerated);
layout.addTitle("Emotes");
layout.addDropdown<float>(