diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-01-06 18:08:01 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-01-06 18:29:08 +0100 |
commit | 51d7e6499269af9106a8e36a25eb9ac1dfd8c57d (patch) | |
tree | 6fb2e636a83339398f808675887c130960a2ca68 /src | |
parent | Use fetchMore for native lazy loading of item model data (diff) | |
download | nheko-51d7e6499269af9106a8e36a25eb9ac1dfd8c57d.tar.xz |
Simplify read message logic with inverted timeline
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 3dafb8c2..0e7f5259 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -516,7 +516,7 @@ TimelineModel::setCurrentIndex(int index) currentId = indexToId(index); emit currentIndexChanged(index); - if (oldIndex < index && !pending.contains(currentId) && + if ((oldIndex > index || oldIndex == -1) && !pending.contains(currentId) && ChatPage::instance()->isActiveWindow()) { readEvent(currentId.toStdString()); } |