mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 03:55:09 +01:00
Improve containsIndex
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
3ae52ea1ca
commit
e10b494f0c
@ -43,9 +43,7 @@ class ItemRange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
containsIndex(idx) {
|
containsIndex(idx) {
|
||||||
// TODO: Replace by lastIndex
|
return idx >= this.topCount && idx < this.lastIndex;
|
||||||
// TODO: Should idx be <= since lastIndex is not rendered?
|
|
||||||
return idx >= this.topCount && idx <= (this.topCount + this.renderCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
expand(amount) {
|
expand(amount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user