aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-30 12:13:14 +0300
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-30 12:13:14 +0300
commit53e3ef39af62dc44cfa3984db3cc18b0a5d349b6 (patch)
tree5951406ca0605d452596b2d47370dae638f25249
parenta7f158d1cfdc5c572a62af5a6945e4a6b88e8253 (diff)
downloadlibquotient-53e3ef39af62dc44cfa3984db3cc18b0a5d349b6.tar.gz
libquotient-53e3ef39af62dc44cfa3984db3cc18b0a5d349b6.zip
Room::timelineSize() convenience method
-rw-r--r--room.cpp5
-rw-r--r--room.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index 4f58e393..1b6afac9 100644
--- a/room.cpp
+++ b/room.cpp
@@ -414,6 +414,11 @@ int Room::memberCount() const
return d->membersMap.size();
}
+int Room::timelineSize() const
+{
+ return int(d->timeline.size());
+}
+
void Room::Private::insertMemberIntoMap(User *u)
{
auto namesakes = membersMap.values(u->name());
diff --git a/room.h b/room.h
index 2fa7e7d5..f224a8ae 100644
--- a/room.h
+++ b/room.h
@@ -97,6 +97,7 @@ namespace QMatrixClient
Q_INVOKABLE QList<User*> users() const;
Q_INVOKABLE QStringList memberNames() const;
Q_INVOKABLE int memberCount() const;
+ Q_INVOKABLE int timelineSize() const;
/**
* Returns a room avatar and requests it from the network if needed