fix: Don't attempt to put the broadcaster username at the top (#5244)

This commit is contained in:
pajlada
2024-03-10 11:49:13 +01:00
committed by GitHub
parent b9b1b8cf9c
commit 9d02fa14ed
2 changed files with 3 additions and 10 deletions
@@ -67,16 +67,9 @@ void UserSource::initializeFromChannel(const Channel *channel)
return user.first == tc->getName();
});
if (it != this->items_.end())
if (it == this->items_.end())
{
auto broadcaster = *it;
this->items_.erase(it);
this->items_.insert(this->items_.begin(), broadcaster);
}
else
{
this->items_.insert(this->items_.begin(),
{tc->getName(), tc->getDisplayName()});
this->items_.emplace_back(tc->getName(), tc->getDisplayName());
}
}
}