From 8808c630f25f72ebb9974fa2786d83a9e11e49b8 Mon Sep 17 00:00:00 2001 From: TriKriSta Date: Sun, 30 Sep 2018 00:07:17 +0300 Subject: [PATCH] fix: show the date every new day (fixes #5280) --- src/widget/form/chatform.cpp | 2 +- src/widget/form/chatform.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 933902915..b2c48a0e2 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -814,7 +814,7 @@ void ChatForm::insertChatlines(QList chatLines) verticalBar->setValue(savedSliderPos); } -QDate ChatForm::addDateLineIfNeeded(QList msgs, QDate const& lastDate, +QDate ChatForm::addDateLineIfNeeded(QList& msgs, QDate const& lastDate, History::HistMessage const& newMessage, MessageMetadata const& metadata) { diff --git a/src/widget/form/chatform.h b/src/widget/form/chatform.h index fe0cd0f2b..6b68a9059 100644 --- a/src/widget/form/chatform.h +++ b/src/widget/form/chatform.h @@ -128,7 +128,7 @@ private: {} }; void handleLoadedMessages(QList newHistMsgs, bool processUndelivered); - QDate addDateLineIfNeeded(QList msgs, QDate const& lastDate, + QDate addDateLineIfNeeded(QList& msgs, QDate const& lastDate, History::HistMessage const& newMessage, MessageMetadata const& metadata); MessageMetadata getMessageMetadata(History::HistMessage const& histMessage); ChatMessage::Ptr chatMessageFromHistMessage(History::HistMessage const& histMessage,