Commit graph

7 commits

Author SHA1 Message Date
Travis Ralston
e519e704e9
Apply suggestions from code review 2021-06-28 20:40:11 -06:00
Germain Souquet
652e06a7b1 remove cancelAnimationFrame complexity and rely on MarkedExecution class 2021-06-28 09:24:35 +01:00
Germain Souquet
21caa6df12 move live recording logic down the component tree 2021-06-24 09:58:11 +01:00
Travis Ralston
76308de532 Add optional mark function callback 2021-06-24 09:19:33 +01:00
Travis Ralston
0e49c4343c Internalize algorithm updates in the new room list store
Fixes https://github.com/vector-im/riot-web/issues/14411

The act of setting/changing the algorithm was causing the update function to be marked, meaning we wouldn't trigger an update until something else happened later. To get around this, and still support internal functions spamming calls without multiple updates, we simply move the guts to an internalized function and make the public interface do a trigger.
2020-07-10 21:59:12 -06:00
Travis Ralston
46d53e5c8c Reset before trigger just in case the function triggers too 2020-07-10 08:14:33 -06:00
Travis Ralston
1315f34662 Dedupe room list store updates by marking for updates
The core of this is in the MarkedExecution class, with the remainder of the commit ensuring that the right marks and triggers are in place to do the firing.

Because everything is async/await and run through the RoomListStore, we don't have to worry about self-fed updates in the algorithm classes. This also means we have to trigger pretty much all the time. 

Changes to tag ordering / list sorting get hit through two paths, so we mark before we do a bulk update and otherwise assume the call is coming in from outside.
2020-07-09 14:53:14 -06:00