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:
Rasmus Karlsson
2017-11-04 14:57:29 +01:00
parent 064daaa77a
commit 7b2e3a94a6
14 changed files with 132 additions and 105 deletions
+3 -4
View File
@@ -58,12 +58,11 @@ Resources::BadgeVersion::BadgeVersion(QJsonObject &&root, EmoteManager &emoteMan
{
}
void Resources::loadChannelData(const std::string &roomID, bool bypassCache)
void Resources::loadChannelData(const QString &roomID, bool bypassCache)
{
qDebug() << "Load channel data for" << QString::fromStdString(roomID);
qDebug() << "Load channel data for" << roomID;
QString url = "https://badges.twitch.tv/v1/badges/channels/" + QString::fromStdString(roomID) +
"/display?language=en";
QString url = "https://badges.twitch.tv/v1/badges/channels/" + roomID + "/display?language=en";
util::NetworkRequest req(url);
req.setCaller(QThread::currentThread());