From 095444aff98ac56663bb205837a57e746d950f3b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 12 Dec 2018 13:20:05 +0900 Subject: Room::allMembersLoaded(); more doc-comments --- lib/room.cpp | 1 + lib/room.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib/room.cpp b/lib/room.cpp index 439bec0f..7232741a 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -619,6 +619,7 @@ void Room::Private::getAllMembers() roomChanges |= q->processStateEvent(**it); if (roomChanges&MembersChange) emit q->memberListChanged(); + emit q->allMembersLoaded(); }); } diff --git a/lib/room.h b/lib/room.h index 7b5be331..ba1eaa48 100644 --- a/lib/room.h +++ b/lib/room.h @@ -228,6 +228,13 @@ namespace QMatrixClient rev_iter_t findInTimeline(const QString& evtId) const; bool displayed() const; + /// Mark the room as currently displayed to the user + /** + * Marking the room displayed causes the room to obtain the full + * list of members if it's been lazy-loaded before; in the future + * it may do more things bound to "screen time" of the room, e.g. + * measure that "screen time". + */ void setDisplayed(bool displayed = true); QString firstDisplayedEventId() const; rev_iter_t firstDisplayedMarker() const; @@ -431,6 +438,9 @@ namespace QMatrixClient void memberAboutToRename(User* user, QString newName); void memberRenamed(User* user); void memberListChanged(); + /// The previously lazy-loaded members list is now loaded entirely + /// \sa setDisplayed + void allMembersLoaded(); void encryption(); void joinStateChanged(JoinState oldState, JoinState newState); -- cgit v1.2.3