Huge refactor
- Remove some underscore-prefixes
- Start using this-> more
- Remove a few of the singletons (We pass references to managers to
things that need it now. Might not be much better, but for now
it works. It also shows what places might be slightly wrong
designed)
This commit is contained in:
@@ -4,13 +4,15 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class WindowManager;
|
||||
class EmoteManager;
|
||||
class IrcManager;
|
||||
|
||||
class ChannelManager
|
||||
{
|
||||
public:
|
||||
static ChannelManager &getInstance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
explicit ChannelManager(WindowManager &_windowManager, EmoteManager &_emoteManager,
|
||||
IrcManager &_ircManager);
|
||||
|
||||
std::shared_ptr<Channel> getWhispers();
|
||||
std::shared_ptr<Channel> getMentions();
|
||||
@@ -23,9 +25,9 @@ public:
|
||||
void removeChannel(const QString &channel);
|
||||
|
||||
private:
|
||||
static ChannelManager instance;
|
||||
|
||||
ChannelManager();
|
||||
WindowManager &windowManager;
|
||||
EmoteManager &emoteManager;
|
||||
IrcManager &ircManager;
|
||||
|
||||
QMap<QString, std::tuple<std::shared_ptr<Channel>, int>> _channels;
|
||||
QMutex _channelsMutex;
|
||||
|
||||
Reference in New Issue
Block a user