summary refs log tree commit diff
path: root/include/RoomList.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-30 17:29:57 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-30 17:29:57 +0200
commit208f9579118307d7749de9bf9be537bf1a1d2b27 (patch)
tree2f27f4bcfab73a996a46964da9a256e4377af322 /include/RoomList.h
parentUse qobject_cast on TimelineItem (diff)
downloadnheko-208f9579118307d7749de9bf9be537bf1a1d2b27.tar.xz
Re-order room list based on activity
fixes #2
Diffstat (limited to 'include/RoomList.h')
-rw-r--r--include/RoomList.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/RoomList.h b/include/RoomList.h

index ed05e0be..6b2151a2 100644 --- a/include/RoomList.h +++ b/include/RoomList.h
@@ -36,6 +36,7 @@ class RoomInfoListItem; class RoomSettings; class RoomState; class Sync; +class UserSettings; struct DescInfo; class RoomList : public QWidget @@ -43,7 +44,9 @@ class RoomList : public QWidget Q_OBJECT public: - RoomList(QSharedPointer<MatrixClient> client, QWidget *parent = 0); + RoomList(QSharedPointer<MatrixClient> client, + QSharedPointer<UserSettings> userSettings, + QWidget *parent = 0); ~RoomList(); void setCache(QSharedPointer<Cache> cache) { cache_ = cache; } @@ -81,6 +84,10 @@ public slots: protected: void paintEvent(QPaintEvent *event) override; + void leaveEvent(QEvent *event) override; + +private slots: + void sortRoomsByLastMessage(); private: void calculateUnreadMessageCount(); @@ -101,4 +108,7 @@ private: QSharedPointer<MatrixClient> client_; QSharedPointer<Cache> cache_; + QSharedPointer<UserSettings> userSettings_; + + bool isSortPending_ = false; };