Fixes #1220 Added setting do disable timeout stacking

This commit is contained in:
fourtf 2019-08-21 00:41:48 +02:00
parent f3e48c1325
commit b84c3ac3be
3 changed files with 5 additions and 3 deletions

View file

@ -144,7 +144,7 @@ void Channel::addOrReplaceTimeout(MessagePtr message)
if (!message->flags.has(MessageFlag::PubSub) && if (!message->flags.has(MessageFlag::PubSub) &&
s->flags.has(MessageFlag::PubSub)) // s->flags.has(MessageFlag::PubSub)) //
{ {
addMessage = false; addMessage = timeoutStackStyle == TimeoutStackStyle::DontStack;
break; break;
} }

View file

@ -21,8 +21,9 @@ using MessageFlags = FlagsEnum<MessageFlag>;
enum class TimeoutStackStyle : int { enum class TimeoutStackStyle : int {
StackHard = 0, StackHard = 0,
DontStackBeyondUserMessage = 1, DontStackBeyondUserMessage = 1,
DontStack = 2,
Default = StackHard, Default = DontStackBeyondUserMessage,
}; };
class Channel : public std::enable_shared_from_this<Channel> class Channel : public std::enable_shared_from_this<Channel>

View file

@ -219,7 +219,8 @@ void GeneralPage::initLayout(SettingsLayout &layout)
layout.addCheckbox("Hide moderation messages", s.hideModerationActions); layout.addCheckbox("Hide moderation messages", s.hideModerationActions);
layout.addCheckbox("Colorize gray nicknames", s.colorizeNicknames); layout.addCheckbox("Colorize gray nicknames", s.colorizeNicknames);
layout.addDropdown<int>("Timeout stacking style", layout.addDropdown<int>("Timeout stacking style",
{"Stack", "Stack sparingly"}, s.timeoutStackStyle, {"Stack", "Stack unless timed out", "Don't stack"},
s.timeoutStackStyle,
[](int index) { return index; }, [](int index) { return index; },
[](auto args) { return args.index; }, false); [](auto args) { return args.index; }, false);