summary refs log tree commit diff
path: root/include/TimelineView.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-07 20:50:32 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-07 20:51:35 +0300
commit6e1285bb0e1f1d2b4aa443c72521c9b1f3255bfb (patch)
treebc107bf979c8f3c796f6e95e9c106d55ddc171a0 /include/TimelineView.h
parentUse shared pointer for the modals (diff)
downloadnheko-6e1285bb0e1f1d2b4aa443c72521c9b1f3255bfb.tar.xz
Prevent FOUC
Diffstat (limited to 'include/TimelineView.h')
-rw-r--r--include/TimelineView.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/TimelineView.h b/include/TimelineView.h

index 4b5a2f77..9b81485d 100644 --- a/include/TimelineView.h +++ b/include/TimelineView.h
@@ -97,6 +97,9 @@ public slots: // Add old events at the top of the timeline. void addBackwardsEvents(const QString &room_id, const RoomMessages &msgs); + // Whether or not the initial batch has been loaded. + bool hasLoaded(); + signals: void updateLastTimelineMessage(const QString &user, const DescInfo &info); @@ -163,3 +166,9 @@ TimelineView::isDuplicate(const QString &event_id) { return eventIds_.contains(event_id); } + +inline bool +TimelineView::hasLoaded() +{ + return scroll_layout_->count() > 1 || isTimelineFinished; +}