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

Subscribe to RoomListItems in the visible range #3169

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Jul 9, 2024

This ensures the room list items always have updated info.

Content

  • Subscribe to RoomListItems in the visible range so we always have updated info for them. This also helps preload the data rendered when you open one of those rooms.

Motivation and context

Fixes a limitation introduced by the client side sorting since we no longer use SlidingSync's visible_rooms and only fetch the latest event of all the room list items (which, if it's a state event, won't be displayed in the room list).

Tests

  • Clear cache / log out and in with your account.
  • Once you're in the room list again you'll see the first few items may have incomplete data.
  • Shortly after, the UI should change and reflect the latest info.
  • If you scroll, older items will also lazily load this data.
  • No rooms should be displayed without a latest event. If there is one, it's probably because its latest message-like event is not in the latest 20 loaded events.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • 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 define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Change For updates to an existing feature label Jul 9, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner July 9, 2024 14:07
@jmartinesp jmartinesp requested review from ganfra and removed request for a team July 9, 2024 14:07
This ensures the room list items always have updated info.
@jmartinesp jmartinesp force-pushed the misc/jme/add-room-subscription-to-timeline-items-with-no-latest-event branch from 08a5772 to c7d7c45 Compare July 9, 2024 14:09
Copy link
Contributor

github-actions bot commented Jul 9, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/Xuzhtc

@jmartinesp jmartinesp force-pushed the misc/jme/add-room-subscription-to-timeline-items-with-no-latest-event branch from f5a9919 to 1d1c356 Compare July 9, 2024 14:43
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.12%. Comparing base (573cd5e) to head (524fdd8).

Files Patch % Lines
...ndroid/features/roomlist/impl/RoomListPresenter.kt 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3169      +/-   ##
===========================================
+ Coverage    76.11%   76.12%   +0.01%     
===========================================
  Files         1641     1641              
  Lines        38624    38646      +22     
  Branches      7471     7476       +5     
===========================================
+ Hits         29397    29420      +23     
  Misses        5335     5335              
+ Partials      3892     3891       -1     

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

Copy link

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 11, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 11, 2024
@jmartinesp jmartinesp merged commit 5944f11 into develop Jul 11, 2024
30 checks passed
@jmartinesp jmartinesp deleted the misc/jme/add-room-subscription-to-timeline-items-with-no-latest-event branch July 11, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Change For updates to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants