Fix color @usernames sometimes not working at all (#3170)

Definitely memory fuckery involved - The comment from @lubieerror https://github.com/Chatterino/chatterino2/issues/2822#issuecomment-897252673 is finally what led me to adding tests and hopefully fixing this.
This commit is contained in:
pajlada
2021-08-21 12:38:38 +02:00
committed by GitHub
parent 07454d0537
commit d7fd08b1d6
6 changed files with 128 additions and 1 deletions
+6
View File
@@ -74,6 +74,12 @@ void ChannelChatters::updateOnlineChatters(
chatters_->updateOnlineChatters(chatters);
}
size_t ChannelChatters::colorsSize() const
{
auto size = this->chatterColors_.access()->size();
return size;
}
const QColor ChannelChatters::getUserColor(const QString &user)
{
const auto chatterColors = this->chatterColors_.access();