Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(ui): remove useless variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Oct 25, 2018
1 parent d54e210 commit 2557f5e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/chatlog/chatmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#define NAME_COL_WIDTH 90.0
#define TIME_COL_WIDTH 90.0

QMap <QString, QColor> authorColor;

ChatMessage::ChatMessage()
{
Expand Down Expand Up @@ -90,20 +89,18 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString& sender, const QSt
authorFont.setBold(true);

QColor color = QColor(0, 0, 0);
QColor authorColor;

if (colorizeName && Settings::getInstance().getEnableGroupChatsColor())
{
QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Sha256);
quint8 *data = (quint8*)hash.data();

if (!authorColor[sender].isValid())
{
authorColor[sender].setHsv(data[0], 255, 196);
}
authorColor.setHsv(data[0], 255, 196);

if (!isMe)
{
color = authorColor[sender];
color = authorColor;
}
}

Expand Down

0 comments on commit 2557f5e

Please sign in to comment.