absorbed HighlightController into Application
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "providers/colors/ColorProvider.hpp"
|
||||
|
||||
#include "controllers/highlights/HighlightController.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
@@ -38,12 +37,12 @@ QSet<QColor> ColorProvider::recentColors() const
|
||||
* Currently, only colors used in highlight phrases are considered. This
|
||||
* may change at any point in the future.
|
||||
*/
|
||||
for (auto phrase : getApp()->highlights->phrases)
|
||||
for (auto phrase : getApp()->highlightedMessages)
|
||||
{
|
||||
retVal.insert(*phrase.getColor());
|
||||
}
|
||||
|
||||
for (auto userHl : getApp()->highlights->highlightedUsers)
|
||||
for (auto userHl : getApp()->highlightedUsers)
|
||||
{
|
||||
retVal.insert(*userHl.getColor());
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/highlights/HighlightController.hpp"
|
||||
#include "messages/LimitedQueue.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "providers/twitch/TwitchAccountManager.hpp"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "common/Common.hpp"
|
||||
#include "common/Env.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/highlights/HighlightController.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
#include "providers/twitch/IrcMessageHandler.hpp"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/highlights/HighlightController.hpp"
|
||||
#include "controllers/ignores/IgnoreController.hpp"
|
||||
#include "controllers/pings/MutedChannelController.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
@@ -1018,7 +1017,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
|
||||
QString currentUsername = currentUser->getUserName();
|
||||
|
||||
if (app->highlights->blacklistContains(this->ircMessage->nick()))
|
||||
if (app->isBlacklistedUser(this->ircMessage->nick()))
|
||||
{
|
||||
// Do nothing. We ignore highlights from this user.
|
||||
return;
|
||||
@@ -1058,7 +1057,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
}
|
||||
|
||||
// Highlight because of sender
|
||||
auto userHighlights = app->highlights->highlightedUsers.readOnly();
|
||||
auto userHighlights = app->highlightedUsers.readOnly();
|
||||
for (const HighlightPhrase &userHighlight : *userHighlights)
|
||||
{
|
||||
if (!userHighlight.isMatch(this->ircMessage->nick()))
|
||||
@@ -1110,7 +1109,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->highlights->phrases.cloneVector();
|
||||
app->highlightedMessages.cloneVector();
|
||||
|
||||
if (getSettings()->enableSelfHighlight && currentUsername.size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user