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:
@@ -6,13 +6,12 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class ChannelManager;
|
||||
|
||||
class WindowManager
|
||||
{
|
||||
public:
|
||||
static WindowManager &getInstance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
explicit WindowManager(ChannelManager &_channelManager);
|
||||
|
||||
void layoutVisibleChatWidgets(Channel *channel = nullptr);
|
||||
void repaintVisibleChatWidgets(Channel *channel = nullptr);
|
||||
@@ -25,12 +24,12 @@ public:
|
||||
void save();
|
||||
|
||||
private:
|
||||
static WindowManager instance;
|
||||
ChannelManager &channelManager;
|
||||
|
||||
WindowManager();
|
||||
std::mutex windowMutex;
|
||||
|
||||
std::mutex _windowMutex;
|
||||
widgets::MainWindow *_mainWindow;
|
||||
// TODO(pajlada): Store as a value instead of a pointer
|
||||
widgets::MainWindow *mainWindow = nullptr;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user