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
+5 -8
View File
@@ -289,13 +289,11 @@ void SeventvEmotes::loadChannelEmotes(
{
if (hasEmotes)
{
shared->addMessage(
makeSystemMessage("7TV channel emotes reloaded."));
shared->addSystemMessage("7TV channel emotes reloaded.");
}
else
{
shared->addMessage(
makeSystemMessage(CHANNEL_HAS_NO_EMOTES));
shared->addSystemMessage(CHANNEL_HAS_NO_EMOTES);
}
}
},
@@ -312,8 +310,7 @@ void SeventvEmotes::loadChannelEmotes(
<< result.parseJson();
if (manualRefresh)
{
shared->addMessage(
makeSystemMessage(CHANNEL_HAS_NO_EMOTES));
shared->addSystemMessage(CHANNEL_HAS_NO_EMOTES);
}
}
else
@@ -323,10 +320,10 @@ void SeventvEmotes::loadChannelEmotes(
qCWarning(chatterinoSeventv)
<< "Error fetching 7TV emotes for channel" << channelId
<< ", error" << errorString;
shared->addMessage(makeSystemMessage(
shared->addSystemMessage(
QStringLiteral("Failed to fetch 7TV channel "
"emotes. (Error: %1)")
.arg(errorString)));
.arg(errorString));
}
});
}