Files
element-x-android/features
hayaksi1 0aa283729c Cover every branch of the forward pagination gate
Codecov reported 55.55% patch coverage on the previous commit: four of the nine
measured lines were only partially covered. No test paginates forwards in a
thread timeline, and the focus states Requested, Loading and Failure were never
live when a forward pagination arrived, so only the Success branch of
isPending() was ever evaluated both ways.

Add a test per uncovered state: a forward pagination is deferred while the focus
request is still being debounced and while the focused timeline is being
created, it is performed again once the request has failed, and it is dropped in
a thread timeline while a backward one still goes through.

The pagination recorder now also sits on the live timeline, and the presenter is
built on that same timeline. Before the detached timeline exists, a pagination
that escaped the gate would go to the live one, so without this the new guards
would pass against the unfixed presenter. The deferred cases end on the emitted
state rather than on cancelAndIgnoreRemainingEvents for the same reason: the
recorder throws from inside the presenter coroutine and cancelling swallows it.

Verified by reverting the gate: the three deferred-pagination tests then fail
with "This lambda should never be called."
2026-08-18 00:49:03 +03:00
..
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 12:10:39 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00
2026-08-17 11:34:52 +02:00