mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(ui): remove useless variable
This commit is contained in:
parent
d54e21064c
commit
2557f5e045
|
@ -37,7 +37,6 @@
|
||||||
#define NAME_COL_WIDTH 90.0
|
#define NAME_COL_WIDTH 90.0
|
||||||
#define TIME_COL_WIDTH 90.0
|
#define TIME_COL_WIDTH 90.0
|
||||||
|
|
||||||
QMap <QString, QColor> authorColor;
|
|
||||||
|
|
||||||
ChatMessage::ChatMessage()
|
ChatMessage::ChatMessage()
|
||||||
{
|
{
|
||||||
|
@ -90,20 +89,18 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString& sender, const QSt
|
||||||
authorFont.setBold(true);
|
authorFont.setBold(true);
|
||||||
|
|
||||||
QColor color = QColor(0, 0, 0);
|
QColor color = QColor(0, 0, 0);
|
||||||
|
QColor authorColor;
|
||||||
|
|
||||||
if (colorizeName && Settings::getInstance().getEnableGroupChatsColor())
|
if (colorizeName && Settings::getInstance().getEnableGroupChatsColor())
|
||||||
{
|
{
|
||||||
QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Sha256);
|
QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Sha256);
|
||||||
quint8 *data = (quint8*)hash.data();
|
quint8 *data = (quint8*)hash.data();
|
||||||
|
|
||||||
if (!authorColor[sender].isValid())
|
authorColor.setHsv(data[0], 255, 196);
|
||||||
{
|
|
||||||
authorColor[sender].setHsv(data[0], 255, 196);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isMe)
|
if (!isMe)
|
||||||
{
|
{
|
||||||
color = authorColor[sender];
|
color = authorColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user