Browse Source

fix(chatlog): Display correct system message timestamp in chatlog

pull/6607/head
Anthony Bilinski 3 years ago
parent
commit
25223119c9
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/chatlog/chatwidget.cpp
  2. 1
      src/persistence/history.cpp

2
src/chatlog/chatwidget.cpp

@ -1440,7 +1440,7 @@ void ChatWidget::renderItem(const ChatLogItem& item, bool hideName, bool coloriz @@ -1440,7 +1440,7 @@ void ChatWidget::renderItem(const ChatLogItem& item, bool hideName, bool coloriz
auto chatMessageType = getChatMessageType(systemMessage);
chatMessage = ChatMessage::createChatInfoMessage(systemMessage.toString(),
chatMessageType, QDateTime::currentDateTime(), documentCache, settings,
chatMessageType, systemMessage.timestamp, documentCache, settings,
style);
// Ignore caller's decision to hide the name. We show the icon in the
// slot of the sender's name so we always want it visible

1
src/persistence/history.cpp

@ -613,6 +613,7 @@ QList<History::HistMessage> History::getMessagesForChat(const ChatId& chatId, si @@ -613,6 +613,7 @@ QList<History::HistMessage> History::getMessagesForChat(const ChatId& chatId, si
assert(!it->isNull());
SystemMessage systemMessage;
systemMessage.messageType = static_cast<SystemMessageType>((*it++).toLongLong());
systemMessage.timestamp = timestamp;
auto argEnd = std::next(it, systemMessage.args.size());
std::transform(it, argEnd, systemMessage.args.begin(), [](const QVariant& arg) {

Loading…
Cancel
Save