summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-08-05 15:59:24 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-08-05 15:59:24 +0300
commitaf0f22fc9102e931a0d4cee43f642d084e5e539f (patch)
tree48e88e8163c25920de722ba7d10de7a410a256be /include
parentParse utf-8 data properly (diff)
downloadnheko-af0f22fc9102e931a0d4cee43f642d084e5e539f.tar.xz
Keep fetching history until the scrollbar gets activated
Diffstat (limited to 'include')
-rw-r--r--include/RoomInfoListItem.h3
-rw-r--r--include/TimelineView.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h

index 12d5abb1..8ead930b 100644 --- a/include/RoomInfoListItem.h +++ b/include/RoomInfoListItem.h
@@ -56,13 +56,14 @@ public slots: protected: void mousePressEvent(QMouseEvent *event) override; void paintEvent(QPaintEvent *event) override; + void resizeEvent(QResizeEvent *event) override; void contextMenuEvent(QContextMenuEvent *event) override; private: QString notificationText(); const int Padding = 7; - const int IconSize = 46; + const int IconSize = 48; RippleOverlay *ripple_overlay_; diff --git a/include/TimelineView.h b/include/TimelineView.h
index ea3e5fb3..f1860dbe 100644 --- a/include/TimelineView.h +++ b/include/TimelineView.h
@@ -73,12 +73,12 @@ public: int addEvents(const Timeline &timeline); void addUserTextMessage(const QString &msg, int txn_id); void updatePendingMessage(int txn_id, QString event_id); - void fetchHistory(); void scrollDown(); public slots: void sliderRangeChanged(int min, int max); void sliderMoved(int position); + void fetchHistory(); // Add old events at the top of the timeline. void addBackwardsEvents(const QString &room_id, const RoomMessages &msgs); @@ -118,6 +118,8 @@ private: const int SCROLL_BAR_GAP = 400; + QTimer *paginationTimer_; + int scroll_height_ = 0; int previous_max_height_ = 0;