channels now PART when they are destroyed

This commit is contained in:
fourtf
2018-04-21 00:40:17 +02:00
parent f571a336e0
commit f58ee01cf5
9 changed files with 48 additions and 24 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ void NativeMessagingManager::ReceiverThread::handleMessage(const QJsonObject &ro
util::postToThread([name] {
auto &ts = providers::twitch::TwitchServer::getInstance();
ts.watchingChannel.update(ts.addChannel(name));
ts.watchingChannel.update(ts.getOrAddChannel(name));
});
} else {
qDebug() << "NM unknown channel type";
+1 -1
View File
@@ -317,7 +317,7 @@ IndirectChannel WindowManager::decodeChannel(const QJsonObject &obj)
{
QString type = obj.value("type").toString();
if (type == "twitch") {
return providers::twitch::TwitchServer::getInstance().addChannel(
return providers::twitch::TwitchServer::getInstance().getOrAddChannel(
obj.value("name").toString());
} else if (type == "mentions") {
return providers::twitch::TwitchServer::getInstance().mentionsChannel;