Moved online status checking logic from ChatWidgetHeader to TwitchChannel
- Channel now needs to be initialized with a name. Special cases like the emote window just sends an empty string. - ChatWidget now has a signal which is called whenever the widgets channel is changed - Changed roomID from an std::string to a QString
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <QPaintEvent>
|
||||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
#include <boost/signals2/connection.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -29,7 +30,6 @@ public:
|
||||
explicit ChatWidgetHeader(ChatWidget *_chatWidget);
|
||||
// Update channel text from chat widget
|
||||
void updateChannelText();
|
||||
void checkLive();
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *) override;
|
||||
@@ -44,6 +44,8 @@ private:
|
||||
QPoint dragStart;
|
||||
bool dragging = false;
|
||||
|
||||
boost::signals2::connection onlineStatusChangedConnection;
|
||||
|
||||
QHBoxLayout hbox;
|
||||
|
||||
// top left
|
||||
@@ -62,6 +64,8 @@ private:
|
||||
|
||||
virtual void refreshTheme() override;
|
||||
|
||||
void initializeChannelSignals();
|
||||
|
||||
public slots:
|
||||
void menuMoveSplit();
|
||||
void menuReloadChannelEmotes();
|
||||
|
||||
Reference in New Issue
Block a user