mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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) {
|
||||
// TODO: Replace by lastIndex
|
||||
// TODO: Should idx be <= since lastIndex is not rendered?
|
||||
return idx >= this.topCount && idx <= (this.topCount + this.renderCount);
|
||||
return idx >= this.topCount && idx < this.lastIndex;
|
||||
}
|
||||
|
||||
expand(amount) {
|
||||
|
Loading…
Reference in New Issue
Block a user