From 1460132772648efafb43f9e9344a36d0f988b911 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 28 Jun 2024 23:56:33 +0200 Subject: [PATCH] Fix typing indicator --- src/neochatroom.cpp | 9 +++++++++ src/neochatroom.h | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index a71e6be11..17003b1d1 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -1718,4 +1718,13 @@ void NeoChatRoom::setRoomState(const QString &type, const QString &stateKey, con setState(type, stateKey, QJsonDocument::fromJson(content).object()); } +#if Quotient_VERSION_MINOR == 8 +QList NeoChatRoom::otherMembersTyping() const +{ + auto memberTyping = membersTyping(); + memberTyping.removeAll(localMember()); + return memberTyping; +} +#endif + #include "moc_neochatroom.cpp" diff --git a/src/neochatroom.h b/src/neochatroom.h index c94e17b06..0139638ba 100644 --- a/src/neochatroom.h +++ b/src/neochatroom.h @@ -201,6 +201,10 @@ class NeoChatRoom : public Quotient::Room */ Q_PROPERTY(ChatBarCache *editCache READ editCache CONSTANT) +#if Quotient_VERSION_MINOR == 8 + Q_PROPERTY(QList otherMembersTyping READ otherMembersTyping NOTIFY typingChanged) +#endif + public: /** * @brief Define the types on inline messages that can be shown. @@ -613,6 +617,10 @@ private: void cleanupExtraEventRange(Quotient::RoomEventsRange events); void cleanupExtraEvent(const QString &eventId); +#if Quotient_VERSION_MINOR == 8 + QList otherMembersTyping() const; +#endif + private Q_SLOTS: void updatePushNotificationState(QString type);