Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After ignored users list is updated, use pagination to refill the cleared timelines #102

Merged

Conversation

kevinaboos
Copy link
Member

But, there are still a couple of things we need to fix up:

Ideally we also do not want to re-paginate all rooms, just the ones that were already (partially) paginated.

But, there are still a couple of things we need to fix up:
* saving which event ID is currently shown on each timeline,
  such that we can jump back to displaying that event after the
  timelines get cleared and then refilled.
* subscribing to an ignored user stream, such that we can receive
  an update when the current logged-in user (un)ignores someone
  from a different client that we do not control.
  * See `Client::subscribe_to_ignore_user_list_changes()`:
    <https://matrix-org.github.io/matrix-rust-sdk/matrix_sdk/struct.Client.html#method.subscribe_to_ignore_user_list_changes>
This allows Robrix to be aware of the current logged-in user
ignoring or unignoring a user on a different client instance,
and respond to the fact that an ignore/unignore action has occurred
elsewhere, i.e., *beyond* the ignore user UI flow that is
driven from the UserProfileSlidingPane action buttons.

As such, we move the logic for re-paginating all cleared timelines
to the handler for updates to the ignored users lists.
Do not attempt to trust or use the Matrix SDK's list of ignored users,
as it does not get updated properly in the current version of the SDK.

We now maintain our own list, which does properly get synced
when the logged-in users ignores/unignores other users on a different
client or session.
This includes correctly setting the `ignore_user_button`'s text.
@kevinaboos kevinaboos changed the title Post-ignore_user pagination does work to refill the cleared timeline. After ignored users list is updated, use pagination to refill the cleared timelines Aug 2, 2024
@kevinaboos kevinaboos merged commit 8a60937 into project-robius:main Aug 2, 2024
1 check passed
@kevinaboos kevinaboos deleted the post_ignore_sync_pagination branch August 2, 2024 00:46
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.

1 participant