chore: remove dead code and get rid of MSVC warnings (#6024)

This commit is contained in:
nerix
2025-03-03 13:30:11 +01:00
committed by GitHub
parent d7166fae9f
commit cd8247f921
7 changed files with 9 additions and 46 deletions
+2 -2
View File
@@ -924,9 +924,9 @@ void UserInfoPopup::updateUserData()
// get ignoreHighlights state
bool isIgnoringHighlights = false;
const auto &vector = getSettings()->blacklistedUsers.raw();
for (const auto &user : vector)
for (const auto &blockedUser : vector)
{
if (this->userName_ == user.getPattern())
if (this->userName_ == blockedUser.getPattern())
{
isIgnoringHighlights = true;
break;
+1 -30
View File
@@ -372,36 +372,7 @@ QString SplitInput::handleSendMessage(const std::vector<QString> &arguments)
auto *tc = dynamic_cast<TwitchChannel *>(c.get());
if (!tc)
{
// Reply to message
auto tc = dynamic_cast<TwitchChannel *>(c.get());
if (!tc)
{
// this should not fail
return "";
}
QString message = this->ui_.textEdit->toPlainText();
if (this->enableInlineReplying_)
{
// Remove @username prefix that is inserted when doing inline replies
message.remove(0, this->replyTarget_->displayName.length() +
1); // remove "@username"
if (!message.isEmpty() && message.at(0) == ' ')
{
message.remove(0, 1); // remove possible space
}
}
message = message.replace('\n', ' ');
QString sendMessage =
getApp()->getCommands()->execCommand(message, c, false);
// Reply within TwitchChannel
tc->sendReply(sendMessage, this->replyTarget_->id);
this->postMessageSend(message, arguments);
// this should not fail
return "";
}