Let the user hide messages that have been removed - #7566
Open
hayaksi1 wants to merge 4 commits into
Open
Conversation
Every removed message leaves a "Message removed" placeholder behind, and a moderated room ends up with more placeholders than messages. A new switch in Advanced settings, on by default, drops those items from the timeline instead. The preference sits next to the other per-session timeline rendering options and is read the same way as the read receipt one, so the timeline rebuilds as soon as it is changed. The pinned message list is unaffected: it asks for removed messages explicitly, so a pinned event that was removed still explains why it is no longer there. Part of element-hq#4417
Contributor
|
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
# Conflicts: # features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactoryTest.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Content
Every removed message leaves a "Message removed" placeholder behind, and a room that has been moderated heavily ends up with more placeholders than messages. A new switch in Advanced settings, on by default, drops those items from the timeline instead.
The preference sits next to the other per-session timeline rendering options and is read the same way as the read receipt one, so the timeline rebuilds as soon as it is changed rather than on the next launch.
The pinned message list is unaffected: it asks for removed messages explicitly, so a pinned event that was later removed still explains why it is no longer there.
Motivation and context
Relates to #4417.
Tests
TimelineItemsFactoryTest— with the preference off, a removed event is left out of the timeline and the message next to it is kept.:features:messages:impl,:features:preferences:impland:libraries:preferences:implsuites pass unchanged.These do not cover what happens to a day separator whose only event was removed; the separator is still produced, as it is today for any hidden item.
Tested devices
Checklist