summaryrefslogtreecommitdiffstats
path: root/include/ChatPage.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/ChatPage.h
parent8825e072f2dbb865a625a0b8b5c8a96646762ac2 (diff)
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/ChatPage.h')
-rw-r--r--include/ChatPage.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/ChatPage.h b/include/ChatPage.h
index 074b0753..2107eccf 100644
--- a/include/ChatPage.h
+++ b/include/ChatPage.h
@@ -23,8 +23,8 @@
#include <QWidget>
#include "MatrixClient.h"
-#include "RoomInfo.h"
#include "RoomList.h"
+#include "RoomState.h"
#include "TextInputWidget.h"
#include "TimelineViewManager.h"
#include "TopRoomBar.h"
@@ -58,11 +58,13 @@ private slots:
void initialSyncCompleted(const SyncResponse &response);
void syncCompleted(const SyncResponse &response);
void syncFailed(const QString &msg);
- void changeTopRoomInfo(const RoomInfo &info);
+ void changeTopRoomInfo(const QString &room_id);
void startSync();
void logout();
private:
+ void updateRoomState(RoomState &room_state, const QJsonArray &events);
+
Ui::ChatPage *ui;
RoomList *room_list_;
@@ -74,11 +76,13 @@ private:
QTimer *sync_timer_;
int sync_interval_;
- RoomInfo current_room_;
+ QString current_room_;
QMap<QString, QPixmap> room_avatars_;
UserInfoWidget *user_info_widget_;
+ QMap<QString, RoomState> state_manager_;
+
// Matrix Client API provider.
QSharedPointer<MatrixClient> client_;
};