From 02eeedb338fb741907267cc8eab8b04b7b77b83e Mon Sep 17 00:00:00 2001 From: pphop <1um6okote@gmail.com> Date: Fri, 26 Oct 2018 00:47:52 +0500 Subject: [PATCH] added toggle for greying out historic messages (#822) --- src/providers/twitch/TwitchChannel.cpp | 3 ++- src/singletons/Settings.hpp | 2 ++ src/widgets/settingspages/LookPage.cpp | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 3d9fbcfad..e983c8a42 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -48,7 +48,8 @@ namespace { MessageParseArgs args; TwitchMessageBuilder builder(channel.get(), privMsg, args); - builder.message().flags.set(MessageFlag::Disabled); + if (getSettings()->greyOutHistoricMessages) + builder.message().flags.set(MessageFlag::Disabled); if (!builder.isIgnored()) messages.push_back(builder.build()); diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 6829a0f06..20ce52253 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -35,6 +35,8 @@ public: Qt::VerPattern}; QStringSetting lastMessageColor = {"/appearance/messages/lastMessageColor", ""}; + BoolSetting greyOutHistoricMessages = { + "/appearance/messages/greyOutHistoricMessages", true}; BoolSetting showEmptyInput = {"/appearance/showEmptyInputBox", true}; BoolSetting showMessageLength = {"/appearance/messages/showMessageLength", false}; diff --git a/src/widgets/settingspages/LookPage.cpp b/src/widgets/settingspages/LookPage.cpp index 56680cffc..558504915 100644 --- a/src/widgets/settingspages/LookPage.cpp +++ b/src/widgets/settingspages/LookPage.cpp @@ -152,6 +152,8 @@ void LookPage::addMessageTab(LayoutCreator layout) layout.append(this->createCheckBox( "Alternate background", getSettings()->alternateMessageBackground)); + layout.append(this->createCheckBox("Grey out historic messages", + getSettings()->greyOutHistoricMessages)); // -- layout.emplace(false);