diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-01-16 22:24:23 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-01-16 22:24:23 +0200 |
commit | 26540bd12081d3144e8cf4c27cc8b413e2fe5659 (patch) | |
tree | e48a19a6a3554ac374146f1b14488d802bc989c6 /src/timeline | |
parent | Fix emoji as avatars issue for the receipts (diff) | |
download | nheko-26540bd12081d3144e8cf4c27cc8b413e2fe5659.tar.xz |
Hack to work around layout flickering when adding new timeline items
Diffstat (limited to '')
-rw-r--r-- | src/timeline/TimelineView.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/timeline/TimelineView.cc b/src/timeline/TimelineView.cc index f4cc2d2e..a085b1e0 100644 --- a/src/timeline/TimelineView.cc +++ b/src/timeline/TimelineView.cc @@ -433,7 +433,7 @@ TimelineView::addTimelineItem(TimelineItem *item, TimelineDirection direction) addDateSeparator(newDate, lastItemPosition); } - scroll_layout_->addWidget(item); + pushTimelineItem(item); } else { // The first item (position 0) is a stretch widget that pushes // the widgets to the bottom of the page. @@ -479,7 +479,8 @@ TimelineView::addUserMessage(mtx::events::MessageType ty, const QString &body) TimelineItem *view_item = new TimelineItem(ty, local_user_, body, with_sender, scroll_widget_); - scroll_layout_->addWidget(view_item); + + pushTimelineItem(view_item); lastMessageDirection_ = TimelineDirection::Bottom; |