matrix-react-sdk
225fe675 - Fix room change sometimes being very slow

Commit
8 years ago
Fix room change sometimes being very slow If the js-sdk had a lot of history in memory for a particular room, riot would paginate all that history into the DOM and render it when switching to that room (before then removing it all again). This obviously made switching to that room very slow. This was caused by the fact that we relied on the setState that happens in TimelinePanel after the pagination taking effect such that ScrollPanel sees that it no longer needs to paginate, but in some situations (as far as I can see, in electron...?) this setState would not take effect until the pagination stopped fulfiling requests from memory and hit the network. Fix: don't resolve the promise returned by the pagination request until the setState has actually happened.
Author
Parents
Loading