Skip to content
Snippets Groups Projects
Commit 399defe5 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Sébastien Blin
Browse files

chatview: fix undefined timestamp warning

Change-Id: If3ee1fd3f074e8807fedc66fc02758df62789b39
parent 6183d116
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,8 @@ ColumnLayout { ...@@ -37,8 +37,8 @@ ColumnLayout {
Connections { Connections {
target: MessagesAdapter.messageListModel target: MessagesAdapter.messageListModel
function onTimestampUpdate() { function onTimestampUpdated() {
if (showTime || showDay) { if ((showTime || showDay) && Timestamp !== undefined) {
formattedTime = MessagesAdapter.getFormattedTime(Timestamp) formattedTime = MessagesAdapter.getFormattedTime(Timestamp)
} }
} }
......
...@@ -39,7 +39,7 @@ MessageListModel::MessageListModel(QObject* parent) ...@@ -39,7 +39,7 @@ MessageListModel::MessageListModel(QObject* parent)
: QAbstractListModel(parent) : QAbstractListModel(parent)
, timestampTimer_(new QTimer(this)) , timestampTimer_(new QTimer(this))
{ {
connect(timestampTimer_, &QTimer::timeout, this, &MessageListModel::timestampUpdate); connect(timestampTimer_, &QTimer::timeout, this, &MessageListModel::timestampUpdated);
timestampTimer_->start(1000); timestampTimer_->start(1000);
} }
......
...@@ -134,7 +134,7 @@ public: ...@@ -134,7 +134,7 @@ public:
void emitDataChanged(const QString& msgId, VectorInt roles = {}); void emitDataChanged(const QString& msgId, VectorInt roles = {});
bool isOnlyEmoji(const QString& text) const; 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 addEdition(const QString& msgId, const interaction::Info& info, bool end);
void addReaction(const QString& messageId, const QString& reactionId); void addReaction(const QString& messageId, const QString& reactionId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment