refactor: add Channel::addSystemMessage function (#5500)

This commit is contained in:
pajlada
2024-07-07 22:03:05 +02:00
committed by GitHub
parent 4535823ca8
commit 354079c74c
47 changed files with 443 additions and 588 deletions
+6 -8
View File
@@ -287,13 +287,12 @@ void FfzEmotes::loadChannel(
{
if (hasEmotes)
{
shared->addMessage(makeSystemMessage(
"FrankerFaceZ channel emotes reloaded."));
shared->addSystemMessage(
"FrankerFaceZ channel emotes reloaded.");
}
else
{
shared->addMessage(
makeSystemMessage(CHANNEL_HAS_NO_EMOTES));
shared->addSystemMessage(CHANNEL_HAS_NO_EMOTES);
}
}
})
@@ -309,8 +308,7 @@ void FfzEmotes::loadChannel(
// User does not have any FFZ emotes
if (manualRefresh)
{
shared->addMessage(
makeSystemMessage(CHANNEL_HAS_NO_EMOTES));
shared->addSystemMessage(CHANNEL_HAS_NO_EMOTES);
}
}
else
@@ -319,10 +317,10 @@ void FfzEmotes::loadChannel(
auto errorString = result.formatError();
qCWarning(LOG) << "Error fetching FFZ emotes for channel"
<< channelID << ", error" << errorString;
shared->addMessage(makeSystemMessage(
shared->addSystemMessage(
QStringLiteral("Failed to fetch FrankerFaceZ channel "
"emotes. (Error: %1)")
.arg(errorString)));
.arg(errorString));
}
})
.execute();