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 -8
View File
@@ -254,7 +254,7 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
const auto &messages = getSampleMiscMessages();
static int index = 0;
const auto &msg = messages[index++ % messages.size()];
getApp()->twitch->addFakeMessage(msg);
getIApp()->getTwitchAbstract()->addFakeMessage(msg);
return "";
});
@@ -262,7 +262,7 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
const auto &messages = getSampleCheerMessages();
static int index = 0;
const auto &msg = messages[index++ % messages.size()];
getApp()->twitch->addFakeMessage(msg);
getIApp()->getTwitchAbstract()->addFakeMessage(msg);
return "";
});
@@ -270,7 +270,7 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
const auto &messages = getSampleLinkMessages();
static int index = 0;
const auto &msg = messages[index++ % messages.size()];
getApp()->twitch->addFakeMessage(msg);
getIApp()->getTwitchAbstract()->addFakeMessage(msg);
return "";
});
@@ -286,7 +286,8 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
oMessage->toInner<PubSubMessageMessage>()
->toInner<PubSubCommunityPointsChannelV1Message>();
app->twitch->addFakeMessage(getSampleChannelRewardIRCMessage());
getIApp()->getTwitchAbstract()->addFakeMessage(
getSampleChannelRewardIRCMessage());
getIApp()->getTwitchPubSub()->pointReward.redeemed.invoke(
oInnerMessage->data.value("redemption").toObject());
alt = !alt;
@@ -309,7 +310,7 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
const auto &messages = getSampleEmoteTestMessages();
static int index = 0;
const auto &msg = messages[index++ % messages.size()];
getApp()->twitch->addFakeMessage(msg);
getIApp()->getTwitchAbstract()->addFakeMessage(msg);
return "";
});
@@ -317,7 +318,7 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
const auto &messages = getSampleSubMessages();
static int index = 0;
const auto &msg = messages[index++ % messages.size()];
getApp()->twitch->addFakeMessage(msg);
getIApp()->getTwitchAbstract()->addFakeMessage(msg);
return "";
});
#endif
@@ -480,8 +481,8 @@ void Window::addShortcuts()
splitContainer = this->notebook_->getOrAddSelectedPage();
}
Split *split = new Split(splitContainer);
split->setChannel(
getApp()->twitch->getOrAddChannel(si.channelName));
split->setChannel(getIApp()->getTwitchAbstract()->getOrAddChannel(
si.channelName));
split->setFilters(si.filters);
splitContainer->insertSplit(split);
splitContainer->setSelected(split);