Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d4d90310 authored by Matt Casey's avatar Matt Casey
Browse files

Add bidirectional scroll capture in infinite scroll.

Previously if we never hit a boundary, we would only capture downard.
This captures above and below in this case.

This has to be done by only requesting adjacent blocks, so the algorithm
is:
- Request tiles upward until we hit the top or we get "enough" headroom
for the infinite scroll case.
- If we hit the top, switch directions, acquire images until we hit
 max tiles or the bottom, then finish.
- If we didn't hit the top, Switch directions and see if you can get the
max tiles in the down direction (if so, finish).
- If we hit the bottom before getting max tiles, switch directions again
and go up until we hit max tiles or the top then finish.

Test: Run scroll capture in infinite scroll, run it near the top of a
finite scroll view and near the bottom, observe output. Enjoy.

Bug: 181562681
Change-Id: Ibe2a0f39ea82789003a30924a9e7f55f0fa37a71
parent b7f82de1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment