Work on read markers

Don't update read marker for outgoing events (they might be local echoes etc).
This commit is contained in:
N-Pex 2021-03-03 12:29:55 +01:00
parent ae09d3a78a
commit 7cf9d5b949
3 changed files with 107 additions and 25 deletions

View file

@ -348,9 +348,17 @@ class Util {
return null;
}
getFirstVisibleElement(parentNode) {
const y = parentNode.scrollTop;
return this.getElementAtY(parentNode, y);
}
getLastVisibleElement(parentNode) {
const y = parentNode.scrollTop + parentNode.clientHeight;
return this.getElementAtY(parentNode, y);
}
getElementAtY(parentNode, y) {
let start = 0;
let end = parentNode.children.length - 1;