Only mark messages as read, when room is active

This commit is contained in:
Nicolas Werner 2019-11-22 16:36:45 +01:00
parent 5429b425e9
commit 7bd875004f

View file

@ -685,7 +685,8 @@ TimelineModel::setCurrentIndex(int index)
currentId = indexToId(index); currentId = indexToId(index);
emit currentIndexChanged(index); emit currentIndexChanged(index);
if (oldIndex < index && !pending.contains(currentId)) { if (oldIndex < index && !pending.contains(currentId) &&
ChatPage::instance()->isActiveWindow()) {
readEvent(currentId.toStdString()); readEvent(currentId.toStdString());
} }
} }