Perform initial refactoring work

Things that were once singletons are no longer singletons, but are
instead stored in the "Application" singleton

Some singletons still remain, and some renaming/renamespacing is left
This commit is contained in:
Rasmus Karlsson
2018-04-27 22:11:19 +02:00
parent 32b6417a55
commit ae26b835b6
78 changed files with 850 additions and 773 deletions
+6 -2
View File
@@ -1,5 +1,6 @@
#include "ircmessagehandler.hpp"
#include "application.hpp"
#include "debug/log.hpp"
#include "messages/limitedqueue.hpp"
#include "messages/message.hpp"
@@ -124,8 +125,10 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
}
}
auto app = getApp();
// refresh all
WindowManager::getInstance().repaintVisibleChatWidgets(chan.get());
app->windows->repaintVisibleChatWidgets(chan.get());
}
void IrcMessageHandler::handleUserStateMessage(Communi::IrcMessage *message)
@@ -152,6 +155,7 @@ void IrcMessageHandler::handleUserStateMessage(Communi::IrcMessage *message)
void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
{
auto app = getApp();
debug::Log("Received whisper!");
messages::MessageParseArgs args;
@@ -171,7 +175,7 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
c->addMessage(_message);
if (SettingManager::getInstance().inlineWhispers) {
if (app->settings->inlineWhispers) {
TwitchServer::getInstance().forEachChannel([_message](ChannelPtr channel) {
channel->addMessage(_message); //
});