Keep fetching history until the scrollbar gets activated
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;
|