diff --git a/src/gui/tray/TalkReplyTextField.qml b/src/gui/tray/TalkReplyTextField.qml index a30f5d4db..93a073f5f 100644 --- a/src/gui/tray/TalkReplyTextField.qml +++ b/src/gui/tray/TalkReplyTextField.qml @@ -11,7 +11,7 @@ Item { target: activityModel function onMessageSent() { replyMessageTextField.clear(); - replyMessageSent.text = activityModel.talkReplyMessageSent(model.index); + replyMessageSent.text = activityModel.replyMessageSent(model.index); } } diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index c92dfdb7e..47b56726c 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -817,7 +817,7 @@ void ActivityListModel::slotRemoveAccount() _showMoreActivitiesAvailableEntry = false; } -void ActivityListModel::replyMessageSent(const int activityIndex, const QString &message) +void ActivityListModel::setReplyMessageSent(const int activityIndex, const QString &message) { if (activityIndex < 0 || activityIndex >= _finalList.size()) { qCWarning(lcActivity) << "Couldn't trigger action on activity at index" << activityIndex << "/ final list size:" << _finalList.size(); @@ -829,7 +829,7 @@ void ActivityListModel::replyMessageSent(const int activityIndex, const QString emit messageSent(); } -QString ActivityListModel::talkReplyMessageSent(const int activityIndex) const +QString ActivityListModel::replyMessageSent(const int activityIndex) const { if (activityIndex < 0 || activityIndex >= _finalList.size()) { qCWarning(lcActivity) << "Couldn't trigger action on activity at index" << activityIndex << "/ final list size:" << _finalList.size(); diff --git a/src/gui/tray/activitylistmodel.h b/src/gui/tray/activitylistmodel.h index f786ba856..fbe1f63aa 100644 --- a/src/gui/tray/activitylistmodel.h +++ b/src/gui/tray/activitylistmodel.h @@ -106,8 +106,8 @@ public: void setCurrentItem(const int currentItem); - void replyMessageSent(const int activityIndex, const QString &message); - Q_INVOKABLE QString talkReplyMessageSent(const int activityIndex) const; + void setReplyMessageSent(const int activityIndex, const QString &message); + Q_INVOKABLE QString replyMessageSent(const int activityIndex) const; public slots: void slotRefreshActivity(); diff --git a/src/gui/tray/usermodel.cpp b/src/gui/tray/usermodel.cpp index 41590bf06..16d3c8263 100644 --- a/src/gui/tray/usermodel.cpp +++ b/src/gui/tray/usermodel.cpp @@ -798,7 +798,7 @@ void User::slotSendReplyMessage(const int activityIndex, const QString &token, c QPointer talkReply = new TalkReply(_account.data(), this); talkReply->sendReplyMessage(token, message, replyTo); connect(talkReply, &TalkReply::replyMessageSent, this, [&](const QString &message) { - _activityModel->replyMessageSent(activityIndex, message); + _activityModel->setReplyMessageSent(activityIndex, message); }); }