fix: remove deprecated Application::getTwitchAbstract (#5560)

This commit is contained in:
pajlada
2024-08-25 13:38:57 +02:00
committed by GitHub
parent 3e510fd9e9
commit ac88730563
21 changed files with 45 additions and 69 deletions
+3 -4
View File
@@ -254,7 +254,7 @@ void NativeMessagingServer::ReceiverThread::handleSelect(
postToThread([=] {
if (!name.isEmpty())
{
auto channel = getApp()->getTwitchAbstract()->getOrAddChannel(name);
auto channel = getApp()->getTwitch()->getOrAddChannel(name);
if (getApp()->getTwitch()->getWatchingChannel().get() != channel)
{
getApp()->getTwitch()->setWatchingChannel(channel);
@@ -268,7 +268,7 @@ void NativeMessagingServer::ReceiverThread::handleSelect(
if (!name.isEmpty())
{
window->setChannel(
getApp()->getTwitchAbstract()->getOrAddChannel(name));
getApp()->getTwitch()->getOrAddChannel(name));
}
#endif
}
@@ -319,8 +319,7 @@ void NativeMessagingServer::syncChannels(const QJsonArray &twitchChannels)
continue;
}
// the deduping is done on the extension side
updated.emplace_back(
getApp()->getTwitchAbstract()->getOrAddChannel(name));
updated.emplace_back(getApp()->getTwitch()->getOrAddChannel(name));
}
// This will destroy channels that aren't used anymore.
+2 -2
View File
@@ -74,7 +74,7 @@ bool isBroadcasterSoftwareActive()
shouldShowTimeoutWarning = false;
postToThread([] {
getApp()->getTwitchAbstract()->addGlobalSystemMessage(
getApp()->getTwitch()->addGlobalSystemMessage(
"Streamer Mode is set to Automatic, but pgrep timed "
"out. This can happen if your system lagged at the "
"wrong moment. If Streamer Mode continues to not work, "
@@ -94,7 +94,7 @@ bool isBroadcasterSoftwareActive()
shouldShowWarning = false;
postToThread([] {
getApp()->getTwitchAbstract()->addGlobalSystemMessage(
getApp()->getTwitch()->addGlobalSystemMessage(
"Streamer Mode is set to Automatic, but pgrep is "
"missing. "
"Install it to fix the issue or set Streamer Mode to "
+2 -3
View File
@@ -668,8 +668,7 @@ IndirectChannel WindowManager::decodeChannel(const SplitDescriptor &descriptor)
if (descriptor.type_ == "twitch")
{
return getApp()->getTwitchAbstract()->getOrAddChannel(
descriptor.channelName_);
return getApp()->getTwitch()->getOrAddChannel(descriptor.channelName_);
}
else if (descriptor.type_ == "mentions")
{
@@ -693,7 +692,7 @@ IndirectChannel WindowManager::decodeChannel(const SplitDescriptor &descriptor)
}
else if (descriptor.type_ == "misc")
{
return getApp()->getTwitchAbstract()->getChannelOrEmpty(
return getApp()->getTwitch()->getChannelOrEmpty(
descriptor.channelName_);
}