Skip to content

fix: Ensure first load of "with replies" tab starts from the top#2308

Merged
nikclayton merged 1 commit into
pachli:mainfrom
nikclayton:2236-restore-null-reading-position
May 27, 2026
Merged

fix: Ensure first load of "with replies" tab starts from the top#2308
nikclayton merged 1 commit into
pachli:mainfrom
nikclayton:2236-restore-null-reading-position

Conversation

@nikclayton

Copy link
Copy Markdown
Contributor

Previous code didn't attempt position restoration unless the loaded page snapshot contained the status ID to restore to.

This doesn't work if there is no position (i.e., the status ID to restore to is null).

Practically, this meant the account screen's "with replies" tab was loading somewhere in the middle of the first page of statuses.

Fix this, by:

  1. Explicitly filtering out updates where the snapshot is empty (can't restore position in an empty snapshot).
  2. Explicitly set the position to restore to 0 if the status ID is null.

Fixes #2236

Previous code didn't attempt position restoration unless the loaded
page snapshot contained the status ID to restore to.

This doesn't work if there is no position (i.e., the status ID to
restore to is null).

Practically, this meant the account screen's "with replies" tab was
loading somewhere in the middle of the first page of statuses.

Fix this, by:

1. Explicitly filtering out updates where the snapshot is empty (can't
restore position in an empty snapshot).
2. Explicitly set the position to restore to 0 if the status ID is
null.

Fixes pachli#2236
@nikclayton nikclayton merged commit b2020ed into pachli:main May 27, 2026
50 of 53 checks passed
@nikclayton nikclayton deleted the 2236-restore-null-reading-position branch May 27, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Account "with replies" tab doesn't start at the top

1 participant