mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
turned QString::compare() call into a bool
create self-similarity with bool isMyself further up in the class implementation
This commit is contained in:
parent
cdc7051e56
commit
89a60ceea8
|
@ -554,7 +554,6 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget()
|
||||||
|
|
||||||
addButton(Unban, "unban", getApp()->resources->buttons.unban);
|
addButton(Unban, "unban", getApp()->resources->buttons.unban);
|
||||||
|
|
||||||
|
|
||||||
const auto timeoutButtons = getSettings()->timeoutButtons.getValue();
|
const auto timeoutButtons = getSettings()->timeoutButtons.getValue();
|
||||||
std::vector<std::pair<QString, int>> t(8); // Timeouts.
|
std::vector<std::pair<QString, int>> t(8); // Timeouts.
|
||||||
auto i = 0;
|
auto i = 0;
|
||||||
|
@ -589,8 +588,11 @@ void UserInfoPopup::fillLatestMessages()
|
||||||
for (size_t i = 0; i < snapshot.size(); i++)
|
for (size_t i = 0; i < snapshot.size(); i++)
|
||||||
{
|
{
|
||||||
MessagePtr message = snapshot[i];
|
MessagePtr message = snapshot[i];
|
||||||
if (!message->loginName.compare(this->userName_, Qt::CaseInsensitive) &&
|
|
||||||
!message->flags.has(MessageFlag::Whisper))
|
bool isSelectedUser = message->loginName.compare(
|
||||||
|
this->userName_, Qt::CaseInsensitive) == 0;
|
||||||
|
|
||||||
|
if (isSelectedUser && !message->flags.has(MessageFlag::Whisper))
|
||||||
{
|
{
|
||||||
channelPtr->addMessage(message);
|
channelPtr->addMessage(message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue