Skip to content

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Jun 13, 2024

This patch is twofold:

  • It updates matrix_sdk_ui::room_list_service::Room::latest_event to fetch the latest event from matrix_sdk::Room instead of matrix_sdk::sliding_sync::SlidingSyncRoom. It removes one dependency to SlidingSyncRoom and it simplifies the code.
  • It removes the matrix_sdk_ui::timeline::SlidingSyncRoomExt trait 🎉.

…oom` in `room_list::Room`.

This patch updates `matrix_sdk_ui::room_list::Room::latest_event`
to fetch the latest event from `matrix_sdk::Room` instead of
`matrix_sdk::sliding_sync::SlidingSyncRoom`. It removes one dependency
to `SlidingSyncRoom` and it simplifies the code.
@Hywan Hywan requested a review from a team as a code owner June 13, 2024 10:04
@Hywan Hywan requested review from andybalaam and removed request for a team June 13, 2024 10:04
@Hywan Hywan changed the title Fix UI roomlist latest event chore(ui): room_list_service::Room::latest_event no longer uses SlidingSyncRoom (+ drop SlidingSyncRoomExt) Jun 13, 2024
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.82%. Comparing base (f770248) to head (6d12894).

Files Patch % Lines
crates/matrix-sdk-ui/src/room_list_service/room.rs 42.85% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3540      +/-   ##
==========================================
- Coverage   83.84%   83.82%   -0.02%     
==========================================
  Files         254      253       -1     
  Lines       25842    25843       +1     
==========================================
- Hits        21668    21664       -4     
- Misses       4174     4179       +5     

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

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Fare thee well SlidingSyncRoomExt! This refactoring makes me happy, thanks.

@bnjbvr bnjbvr removed the request for review from andybalaam June 13, 2024 11:36
This patch removes the `matrix_sdk_ui::timeline::SlidingSyncRoomExt`
trait as it's no longer necessary since `room_list::Room::latest_event`
no longer uses `SlidingSyncRoom` to fetch the latest event.
@Hywan Hywan force-pushed the fix-ui-roomlist-latest-event branch from 1fa6a4a to 6d12894 Compare June 13, 2024 11:47
@Hywan Hywan enabled auto-merge June 13, 2024 11:48
@Hywan Hywan merged commit 6da17b3 into matrix-org:main Jun 13, 2024
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.

2 participants