chore: refactor TwitchIrcServer (#5421)

This commit is contained in:
pajlada
2024-06-01 14:56:40 +02:00
committed by GitHub
parent 2a46ee708e
commit b6dc5d9e03
28 changed files with 373 additions and 163 deletions
+9 -7
View File
@@ -688,27 +688,28 @@ IndirectChannel WindowManager::decodeChannel(const SplitDescriptor &descriptor)
if (descriptor.type_ == "twitch")
{
return app->twitch->getOrAddChannel(descriptor.channelName_);
return getIApp()->getTwitchAbstract()->getOrAddChannel(
descriptor.channelName_);
}
else if (descriptor.type_ == "mentions")
{
return app->twitch->mentionsChannel;
return getIApp()->getTwitch()->getMentionsChannel();
}
else if (descriptor.type_ == "watching")
{
return app->twitch->watchingChannel;
return getIApp()->getTwitch()->getWatchingChannel();
}
else if (descriptor.type_ == "whispers")
{
return app->twitch->whispersChannel;
return getIApp()->getTwitch()->getWhispersChannel();
}
else if (descriptor.type_ == "live")
{
return app->twitch->liveChannel;
return getIApp()->getTwitch()->getLiveChannel();
}
else if (descriptor.type_ == "automod")
{
return app->twitch->automodChannel;
return getIApp()->getTwitch()->getAutomodChannel();
}
else if (descriptor.type_ == "irc")
{
@@ -717,7 +718,8 @@ IndirectChannel WindowManager::decodeChannel(const SplitDescriptor &descriptor)
}
else if (descriptor.type_ == "misc")
{
return app->twitch->getChannelOrEmpty(descriptor.channelName_);
return getIApp()->getTwitchAbstract()->getChannelOrEmpty(
descriptor.channelName_);
}
return Channel::getEmpty();