diff --git a/include/timeline/TimelineView.h b/include/timeline/TimelineView.h index bba40669..1ed84aaf 100644 --- a/include/timeline/TimelineView.h +++ b/include/timeline/TimelineView.h @@ -88,8 +88,8 @@ public: template void addUserMessage(const QString &url, - const QSharedPointer data, - const QString &filename); + const QString &filename, + const QSharedPointer data = Q_NULLPTR); void updatePendingMessage(int txn_id, QString event_id); void scrollDown(); void addDateSeparator(QDateTime datetime, int position); @@ -219,8 +219,8 @@ private: template void TimelineView::addUserMessage(const QString &url, - const QSharedPointer data, - const QString &filename) + const QString &filename, + const QSharedPointer data) { auto with_sender = lastSender_ != local_user_; diff --git a/src/timeline/TimelineViewManager.cc b/src/timeline/TimelineViewManager.cc index 65c9ac83..42145819 100644 --- a/src/timeline/TimelineViewManager.cc +++ b/src/timeline/TimelineViewManager.cc @@ -96,7 +96,7 @@ TimelineViewManager::queueImageMessage(const QString &roomid, auto view = views_[roomid]; - view->addUserMessage(url, data, filename); + view->addUserMessage(url, filename, data); } void @@ -111,7 +111,7 @@ TimelineViewManager::queueFileMessage(const QString &roomid, auto view = views_[roomid]; - view->addUserMessage(url, nullptr, filename); + view->addUserMessage(url, filename); } void @@ -126,7 +126,7 @@ TimelineViewManager::queueAudioMessage(const QString &roomid, auto view = views_[roomid]; - view->addUserMessage(url, nullptr, filename); + view->addUserMessage(url, filename); } void