Make sure read marker is updated correctly
This commit is contained in:
parent
c82c02b39b
commit
613f4e23aa
5 changed files with 38 additions and 8 deletions
|
|
@ -504,16 +504,22 @@ class Util {
|
|||
return null;
|
||||
}
|
||||
|
||||
getFirstVisibleElement(parentNode) {
|
||||
const visible = this.findVisibleElements(parentNode);
|
||||
getFirstVisibleElement(parentNode, where) {
|
||||
let visible = this.findVisibleElements(parentNode);
|
||||
if (visible) {
|
||||
visible = visible.filter(where);
|
||||
}
|
||||
if (visible && visible.length > 0) {
|
||||
return visible[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
getLastVisibleElement(parentNode) {
|
||||
const visible = this.findVisibleElements(parentNode);
|
||||
getLastVisibleElement(parentNode, where) {
|
||||
let visible = this.findVisibleElements(parentNode);
|
||||
if (visible) {
|
||||
visible = visible.filter(where);
|
||||
}
|
||||
if (visible && visible.length > 0) {
|
||||
return visible[visible.length - 1];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue