mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Delete children at the end of the list, not the beginning
Else the IDs are wrong and need to be updated. This fixes the bug with it requesting huge offsets when filtering by room name.
This commit is contained in:
parent
44bfebfab9
commit
c8f44f6c6b
@ -283,8 +283,8 @@ const render = (container, listIndex) => {
|
||||
let removeCount = 0;
|
||||
// ensure we have the right number of children, remove or add appropriately.
|
||||
while (container.childElementCount > listData.joinedCount) {
|
||||
intersectionObserver.unobserve(container.firstChild);
|
||||
container.removeChild(container.firstChild);
|
||||
intersectionObserver.unobserve(container.lastChild);
|
||||
container.removeChild(container.lastChild);
|
||||
removeCount += 1;
|
||||
}
|
||||
for (let i = container.childElementCount; i < listData.joinedCount; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user