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,