Skip to content

Add read all messages feature#7049

Merged
jmartinesp merged 17 commits into
element-hq:developfrom
hghgrtut:feat/read_all_msg_178
Jun 30, 2026
Merged

Add read all messages feature#7049
jmartinesp merged 17 commits into
element-hq:developfrom
hghgrtut:feat/read_all_msg_178

Conversation

@hghgrtut

Copy link
Copy Markdown
Contributor

Content

Add functionality to read all messages in all rooms by one tap. Element X already has this functionality on iOs (https://github.com/element-hq/element-x-ios/pull/5582/changes)

Motivation and context

element-hq/element-meta#2682

Can be useful for example if you work at support and need to clear focus before your next work day.

Already added to iOs element-hq/element-x-ios#5582

Screenshots / GIFs

image

Tests

  • go to home screen when you have unread messages
  • go to developer settings
  • click "Mark all rooms as read"
  • confirm
  • wait some time
  • click read all button in toolbar (may be replaced with other action after review)
  • messages are read

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 15, Android 8.1, Android 7.0

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@hghgrtut hghgrtut requested a review from a team as a code owner June 17, 2026 19:53
@hghgrtut hghgrtut requested review from jmartinesp and removed request for a team June 17, 2026 19:53
@github-actions

Copy link
Copy Markdown
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:

  • If your pull request adds a feature or modifies the UI, this should have an equivalent pull request in the Element X iOS repo unless it only affects an Android-only behaviour or is behind a disabled feature flag, since we need parity in both clients to consider a feature done. It will also need to be approved by our product and design teams before being merged, so it's usually a good idea to discuss the changes in a Github issue first and then start working on them once the approach has been validated.
  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Jun 17, 2026
@hghgrtut

hghgrtut commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@bmarty rewriten according to your feedback #6828 (comment)

@jmartinesp jmartinesp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry for the late review. I wasn't paying much attention to notifications about this PR because I was sure someone else had taken over the review 🤦 .

The code looks mostly fine to me. I'll add the strings to localazy and merge it if there are no problems with the CI. Thanks, and sorry for the delay again 🙏 .

@jmartinesp

jmartinesp commented Jun 30, 2026

Copy link
Copy Markdown
Member

@hghgrtut could you fix the lint issues before merging (unused imports, @Inject being used when @ContributesBinding is already present, etc.)? You can do it with ./gradlew ktlintFormat runQualityChecks, which will both format the code and check what's not passing our lint rules.

Also, a small nit:

image

Since the 'footer' text is added next to the ListItem component instead of being its supportingContent, it's not clickable and that's a bit confusing at first. Could you change that too?


Actually, since I'm adding the strings to the PR I might as well fix those real quick too.

@jmartinesp jmartinesp added the PR-Feature For a new feature label Jun 30, 2026
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.54%. Comparing base (c4f32db) to head (48e903c).

Files with missing lines Patch % Lines
...references/impl/developer/DeveloperSettingsView.kt 35.71% 7 Missing and 2 partials ⚠️
...ences/impl/developer/DeveloperSettingsPresenter.kt 80.00% 2 Missing and 1 partial ⚠️
.../android/libraries/matrix/impl/RustMatrixClient.kt 0.00% 3 Missing ⚠️
...d/features/home/impl/roomlist/RoomListPresenter.kt 75.00% 0 Missing and 1 partial ⚠️
...ferences/impl/developer/DeveloperSettingsEvents.kt 50.00% 1 Missing ⚠️
.../features/preferences/impl/tasks/MarkRoomAsRead.kt 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7049      +/-   ##
===========================================
- Coverage    80.55%   80.54%   -0.02%     
===========================================
  Files         2687     2689       +2     
  Lines        76381    76433      +52     
  Branches     10282    10291       +9     
===========================================
+ Hits         61530    61560      +30     
- Misses       10920    10939      +19     
- Partials      3931     3934       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp jmartinesp merged commit b875215 into element-hq:develop Jun 30, 2026
26 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Feature For a new feature Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants