chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
@@ -77,7 +77,7 @@ QString chatters(const CommandContext &ctx)
// Refresh chatter list via helix api for mods
getHelix()->getChatters(
ctx.twitchChannel->roomId(),
getIApp()->getAccounts()->twitch.getCurrent()->getUserId(), 1,
getApp()->getAccounts()->twitch.getCurrent()->getUserId(), 1,
[channel{ctx.channel}](auto result) {
channel->addSystemMessage(QString("Chatter count: %1.")
.arg(localizeNumbers(result.total)));
@@ -106,7 +106,7 @@ QString testChatters(const CommandContext &ctx)
getHelix()->getChatters(
ctx.twitchChannel->roomId(),
getIApp()->getAccounts()->twitch.getCurrent()->getUserId(), 5000,
getApp()->getAccounts()->twitch.getCurrent()->getUserId(), 5000,
[channel{ctx.channel}, twitchChannel{ctx.twitchChannel}](auto result) {
QStringList entries;
for (const auto &username : result.chatters)