mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Merge pull request #998 from apa420/apa-remove-moderated-messages
Option to hide moderated messages (timed out messages)
This commit is contained in:
commit
0737922915
|
@ -127,6 +127,11 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
|||
|
||||
for (const auto &element : this->message_->elements)
|
||||
{
|
||||
if (getSettings()->hideModerated &&
|
||||
this->message_->flags.has(MessageFlag::Disabled))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
element->addToContainer(*this->container_, _flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -261,6 +261,10 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
|
|||
|
||||
// refresh all
|
||||
app->windows->repaintVisibleChatWidgets(chan.get());
|
||||
if (getSettings()->hideModerated)
|
||||
{
|
||||
app->windows->forceLayoutChannelViews();
|
||||
}
|
||||
}
|
||||
|
||||
void IrcMessageHandler::handleUserStateMessage(Communi::IrcMessage *message)
|
||||
|
|
|
@ -41,6 +41,7 @@ public:
|
|||
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
||||
false};
|
||||
BoolSetting compactEmotes = {"/appearance/messages/compactEmotes", true};
|
||||
BoolSetting hideModerated = {"/appearance/messages/hideModerated", false};
|
||||
|
||||
// BoolSetting collapseLongMessages =
|
||||
// {"/appearance/messages/collapseLongMessages", false};
|
||||
|
|
|
@ -213,6 +213,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("Hide moderated messages", s.hideModerated);
|
||||
|
||||
layout.addTitle("Emotes");
|
||||
layout.addDropdown<float>(
|
||||
|
|
Loading…
Reference in a new issue