moved some Settings from Application to Settings
This commit is contained in:
@@ -169,7 +169,7 @@ bool TwitchMessageBuilder::isIgnored() const
|
||||
auto app = getApp();
|
||||
|
||||
// TODO(pajlada): Do we need to check if the phrase is valid first?
|
||||
auto phrases = app->ignores->phrases.readOnly();
|
||||
auto phrases = getCSettings().ignoredMessages.readOnly();
|
||||
for (const auto &phrase : *phrases)
|
||||
{
|
||||
if (phrase.isBlock() && phrase.isMatch(this->originalMessage_))
|
||||
@@ -764,8 +764,7 @@ void TwitchMessageBuilder::appendUsername()
|
||||
void TwitchMessageBuilder::runIgnoreReplaces(
|
||||
std::vector<std::tuple<int, EmotePtr, EmoteName>> &twitchEmotes)
|
||||
{
|
||||
auto app = getApp();
|
||||
auto phrases = app->ignores->phrases.readOnly();
|
||||
auto phrases = getCSettings().ignoredMessages.readOnly();
|
||||
auto removeEmotesInRange =
|
||||
[](int pos, int len,
|
||||
std::vector<std::tuple<int, EmotePtr, EmoteName>>
|
||||
@@ -1017,7 +1016,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
|
||||
QString currentUsername = currentUser->getUserName();
|
||||
|
||||
if (app->isBlacklistedUser(this->ircMessage->nick()))
|
||||
if (getCSettings().isBlacklistedUser(this->ircMessage->nick()))
|
||||
{
|
||||
// Do nothing. We ignore highlights from this user.
|
||||
return;
|
||||
@@ -1057,7 +1056,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
}
|
||||
|
||||
// Highlight because of sender
|
||||
auto userHighlights = app->highlightedUsers.readOnly();
|
||||
auto userHighlights = getCSettings().highlightedUsers.readOnly();
|
||||
for (const HighlightPhrase &userHighlight : *userHighlights)
|
||||
{
|
||||
if (!userHighlight.isMatch(this->ircMessage->nick()))
|
||||
@@ -1109,7 +1108,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
// TODO: This vector should only be rebuilt upon highlights being changed
|
||||
// fourtf: should be implemented in the HighlightsController
|
||||
std::vector<HighlightPhrase> activeHighlights =
|
||||
app->highlightedMessages.cloneVector();
|
||||
getSettings()->highlightedMessages.cloneVector();
|
||||
|
||||
if (getSettings()->enableSelfHighlight && currentUsername.size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user