summary refs log tree commit diff
path: root/include/Sync.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-07 17:15:38 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-07 17:15:38 +0300
commit1f90c58076b9c40a609c88b9cdad51dd55da6954 (patch)
tree5a45ae1b5b1ca62cf8665aa892de904481dac215 /include/Sync.h
parentAdd matrix::events namespace (diff)
downloadnheko-1f90c58076b9c40a609c88b9cdad51dd55da6954.tar.xz
Use timeline to retrieve state events
- Rooms without any history will be shown.
- Room's state will be kept in sync and any updates will be visible.
Diffstat (limited to 'include/Sync.h')
-rw-r--r--include/Sync.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/Sync.h b/include/Sync.h
index 6a227bcf..bfa03c1b 100644
--- a/include/Sync.h
+++ b/include/Sync.h
@@ -18,6 +18,7 @@
 #ifndef SYNC_H
 #define SYNC_H
 
+#include <QJsonArray>
 #include <QJsonDocument>
 #include <QMap>
 #include <QString>
@@ -90,13 +91,13 @@ class State : public Deserializable
 {
 public:
 	void deserialize(const QJsonValue &data) override;
-	inline QList<Event> events() const;
+	inline QJsonArray events() const;
 
 private:
-	QList<Event> events_;
+	QJsonArray events_;
 };
 
-inline QList<Event> State::events() const
+inline QJsonArray State::events() const
 {
 	return events_;
 }
@@ -104,19 +105,19 @@ inline QList<Event> State::events() const
 class Timeline : public Deserializable
 {
 public:
-	inline QList<Event> events() const;
+	inline QJsonArray events() const;
 	inline QString previousBatch() const;
 	inline bool limited() const;
 
 	void deserialize(const QJsonValue &data) override;
 
 private:
-	QList<Event> events_;
+	QJsonArray events_;
 	QString prev_batch_;
 	bool limited_;
 };
 
-inline QList<Event> Timeline::events() const
+inline QJsonArray Timeline::events() const
 {
 	return events_;
 }