-
Notifications
You must be signed in to change notification settings - Fork 749
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
Delete Events from ignored users and trigger a clear cache request dialog when unignoring user(s) #5772
Conversation
…l user without performing an initial sync each time.
…not be triggered.
Assigned to @ariskotsomitopoulos manually, since you have reviewed the previous PR #5767 and this PR reverts part of the previous change. |
…gnoring a user, for the change to take effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, approved, I didn't run the code. Just a minor comment
// See https://spec.matrix.org/latest/client-server-api/#client-behaviour-22 : | ||
// "Once ignored, the client will no longer receive events sent by that user, with the exception of state events" | ||
// So just delete all non-state events from our local storage. | ||
realm.where(TimelineEventEntity::class.java) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to extract this functionality in TimelineEventEntityQueries.kt
or TimelineEventHelper.kt
. Not a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Will be handled in a dedicated PR later.
Ignoring users
When users is ignored, all the Timeline Events from this user are deleted from the database.
The only remaining issue is that the timeline has to be reloaded for the change to take effect. Related (but not really closing it): #1899. Handled in 903e226Closing #1899
Unignoring user
When users are unignored, an initial sync has to be performed. Current code warn the user and perform an initial sync.
This PR handle the case where users are unignored from another session.
So:
The dialog looks like: