Fix replying and editing from chatbox
Restore the functionality to edit or reply to the last message in the `chatbar`. This is achieved be moving the functions `getLastLocalUserMessageEventId` and `getLatestMessageFromRow` to `NeoChatRoom` as `editLastMessage` and `replyLastMessage` as `chatbar` no longer has access to `messageEventModel`. The functions are also simplified as they only need to find the `eventId` and always from row 0 as this was the only use of the functions. BUG: 469733
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <qobjectdefs.h>
|
||||
#include <room.h>
|
||||
|
||||
#include <QCache>
|
||||
@@ -735,6 +736,20 @@ public:
|
||||
*/
|
||||
void setSavedText(const QString &savedText);
|
||||
|
||||
/**
|
||||
* @brief Reply to the last message sent in the timeline.
|
||||
*
|
||||
* @note This checks a maximum of the previous 35 message for performance reasons.
|
||||
*/
|
||||
Q_INVOKABLE void replyLastMessage();
|
||||
|
||||
/**
|
||||
* @brief Edit the last message sent by the local user.
|
||||
*
|
||||
* @note This checks a maximum of the previous 35 message for performance reasons.
|
||||
*/
|
||||
Q_INVOKABLE void editLastMessage();
|
||||
|
||||
#ifdef QUOTIENT_07
|
||||
/**
|
||||
* @brief Get a PollHandler object for the given event Id.
|
||||
|
||||
Reference in New Issue
Block a user