Remind the user if they're trying to reply to someone who has left

This happens semi-frequently to me and others - we reply to a user who
has left the room. Sometimes this is useful (for example, bringing up a
previous topic) but in most cases this is accidental, and almost
guaranteed to happen if you turned off join/leave events.

So I added a reminder when replying - which manifests as a small label
in the chatbar - that the user has left and can't be notified of your
reply.
This commit is contained in:
Joshua Goins
2025-08-04 16:38:38 -04:00
parent 6822a1ef08
commit 93b6c53c82
5 changed files with 91 additions and 0 deletions

View File

@@ -99,6 +99,13 @@ class ChatBarCache : public QObject
*/
Q_PROPERTY(Quotient::RoomMember relationAuthor READ relationAuthor NOTIFY relationIdChanged)
/**
* @brief If the author for the message being replied to is still present in the room.
*
* @sa Quotient::RoomMember
*/
Q_PROPERTY(bool relationAuthorIsPresent READ relationAuthorIsPresent NOTIFY relationAuthorIsPresentChanged)
/**
* @brief The content of the related message.
*
@@ -153,6 +160,7 @@ public:
void setEditId(const QString &editId);
Quotient::RoomMember relationAuthor() const;
bool relationAuthorIsPresent() const;
QString relationMessage() const;
@@ -196,6 +204,7 @@ Q_SIGNALS:
void threadIdChanged(const QString &oldThreadId, const QString &newThreadId);
void attachmentPathChanged();
void mentionAdded(const QString &mention);
void relationAuthorIsPresentChanged();
private:
QString m_text = QString();