-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Timeline UI: ensure stable position of events in the midst of backgro…
…und updates (#45) * This ensures that the completion of a pagination request in the background does not cause the timeline UI view to erratically jump, which was previously caused by the timeline items being updated out from underneath the timeline UI. * We now ensure that the item currently appearing at the top of the `PortalList` view still appears at that same top-most position *after* the update is applied. * Finding the event that should be at the top can be done much more efficiently in the future, i.e., by tracking how many event items get inserted in the background task, and then forwarding that information to the UI thread. * This would allow us to avoid searching the entire timeline list for the ID of the event that was previously shown at the top. * This is why we now manually implement the `VectorDiff::apply()` function, such that we could interpose on what diffs were being applied and where. * Also added some infrastructure for avoiding redundant drawing work based on whether a timeline item has been changed in the background, but that is not yet being used. * Update README to reflect this new ability.
- Loading branch information
1 parent
6ea6e8b
commit daa5063
Showing
5 changed files
with
144 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.