Fix some documentations & comments (#5286)

* add comments for the new reward filters

* slightly improve documentation of r9k values
This commit is contained in:
pajlada 2024-03-31 13:07:43 +02:00 committed by GitHub
parent b991b957f0
commit 694d53ad20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 4 deletions

View file

@ -50,6 +50,9 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
* message.content
* message.length
*
* reward.title
* reward.cost
* reward.id
*/
using MessageFlag = chatterino::MessageFlag;

View file

@ -462,7 +462,7 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addTitle("Messages");
layout.addCheckbox(
"Separate with lines", s.separateMessages, false,
"Adds a line inbetween each message to help better tell them apart.");
"Adds a line between each message to help better tell them apart.");
layout.addCheckbox("Alternate background color", s.alternateMessages, false,
"Slightly change the background behind every other "
"message to help better tell them apart.");
@ -904,7 +904,10 @@ void GeneralPage::initLayout(GeneralPageView &layout)
toggleLocalr9kShortcut + ".");
layout.addCheckbox("Hide similar messages", s.similarityEnabled);
//layout.addCheckbox("Gray out matches", s.colorSimilarDisabled);
layout.addCheckbox("By the same user", s.hideSimilarBySameUser);
layout.addCheckbox(
"By the same user", s.hideSimilarBySameUser, false,
"When checked, messages that are very similar to each other can still "
"be shown as long as they're sent by different users.");
layout.addCheckbox("Hide my own messages", s.hideSimilarMyself);
layout.addCheckbox("Receive notification sounds from hidden messages",
s.shownSimilarTriggerHighlights);
@ -920,7 +923,10 @@ void GeneralPage::initLayout(GeneralPageView &layout)
},
[](auto args) {
return fuzzyToFloat(args.value, 0.9f);
});
},
true,
"A value of 0.9 means the messages need to be 90% similar to be marked "
"as similar.");
layout.addDropdown<int>(
"Maximum delay between messages",
{"5s", "10s", "15s", "30s", "60s", "120s"}, s.hideSimilarMaxDelay,
@ -929,7 +935,10 @@ void GeneralPage::initLayout(GeneralPageView &layout)
},
[](auto args) {
return fuzzyToInt(args.value, 5);
});
},
true,
"A value of 5s means if there's a 5s break between messages, we will "
"stop looking further through the messages for similarities.");
layout.addDropdown<int>(
"Amount of previous messages to check", {"1", "2", "3", "4", "5"},
s.hideSimilarMaxMessagesToCheck,