diff --git a/src/app/commoncomponents/TimestampInfo.qml b/src/app/commoncomponents/TimestampInfo.qml index 09aff1d00a2d2f53552316421300ded437a7a20b..584596848dc35e4689a3a48cdca8c6294166aedf 100644 --- a/src/app/commoncomponents/TimestampInfo.qml +++ b/src/app/commoncomponents/TimestampInfo.qml @@ -37,8 +37,8 @@ ColumnLayout { Connections { target: MessagesAdapter.messageListModel - function onTimestampUpdate() { - if (showTime || showDay) { + function onTimestampUpdated() { + if ((showTime || showDay) && Timestamp !== undefined) { formattedTime = MessagesAdapter.getFormattedTime(Timestamp) } } diff --git a/src/libclient/messagelistmodel.cpp b/src/libclient/messagelistmodel.cpp index fe0a00fbf83fcc752762f35abcb72a7e0c35a139..5e9a4f8ec963dab818897cc18d781b6aeedf855e 100644 --- a/src/libclient/messagelistmodel.cpp +++ b/src/libclient/messagelistmodel.cpp @@ -39,7 +39,7 @@ MessageListModel::MessageListModel(QObject* parent) : QAbstractListModel(parent) , timestampTimer_(new QTimer(this)) { - connect(timestampTimer_, &QTimer::timeout, this, &MessageListModel::timestampUpdate); + connect(timestampTimer_, &QTimer::timeout, this, &MessageListModel::timestampUpdated); timestampTimer_->start(1000); } diff --git a/src/libclient/messagelistmodel.h b/src/libclient/messagelistmodel.h index b79b2eefa94247b041627a4f2be5ccc196e8369f..2625a612592edd7667830f92f4245e483c77fb62 100644 --- a/src/libclient/messagelistmodel.h +++ b/src/libclient/messagelistmodel.h @@ -134,7 +134,7 @@ public: void emitDataChanged(const QString& msgId, VectorInt roles = {}); bool isOnlyEmoji(const QString& text) const; - Q_SIGNAL void timestampUpdate(); + Q_SIGNAL void timestampUpdated(); void addEdition(const QString& msgId, const interaction::Info& info, bool end); void addReaction(const QString& messageId, const QString& reactionId);