/live split for channels going live (#1998)

Co-authored-by: 23rd <23rd@vivaldi.net>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
apa420
2021-05-09 16:17:04 +02:00
committed by GitHub
parent d96f4575ba
commit dcd65b5978
14 changed files with 104 additions and 12 deletions
+8
View File
@@ -559,6 +559,10 @@ void WindowManager::encodeChannel(IndirectChannel channel, QJsonObject &obj)
obj.insert("type", "whispers");
}
break;
case Channel::Type::TwitchLive: {
obj.insert("type", "live");
}
break;
case Channel::Type::Irc: {
if (auto ircChannel =
dynamic_cast<IrcChannel *>(channel.get().get()))
@@ -608,6 +612,10 @@ IndirectChannel WindowManager::decodeChannel(const SplitDescriptor &descriptor)
{
return app->twitch.server->whispersChannel;
}
else if (descriptor.type_ == "live")
{
return app->twitch.server->liveChannel;
}
else if (descriptor.type_ == "irc")
{
return Irc::instance().getOrAddChannel(descriptor.server_,