diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-22 16:36:45 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-23 20:07:15 +0100 |
commit | 7bd875004f6995865a71a55facf56834c91bfb48 (patch) | |
tree | 03fc8ff1ad99874514263a1cab9898da37fcc2c9 | |
parent | Lint (diff) | |
download | nheko-7bd875004f6995865a71a55facf56834c91bfb48.tar.xz |
Only mark messages as read, when room is active
-rw-r--r-- | src/timeline/TimelineModel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 7c78e552..11344e60 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -685,7 +685,8 @@ TimelineModel::setCurrentIndex(int index) currentId = indexToId(index); emit currentIndexChanged(index); - if (oldIndex < index && !pending.contains(currentId)) { + if (oldIndex < index && !pending.contains(currentId) && + ChatPage::instance()->isActiveWindow()) { readEvent(currentId.toStdString()); } } |