matrix-org / matrix-org/matrix-rust-sdk

Threads: List of threads of the room

Open
#6,290 0 comments 0 reactions 1 assignee Claimed by @Hywan View on GitHub
Dominant language
Rust
Stars
2.3k
Forks
500
Avg merge
1d 16h
Merged PRs (30d)
106

Description

This will act act as an SDK side meta issue for all the tasks relating to **properly** rendering a room's list of threads. [meta](https://github.com/element-hq/element-meta/issues/2954)

Previous work in this regard includes:
* matrix-sdk crate level methods for interacting with the backend and the [Thread Lists API](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3856-threads-list-api.md) in https://github.com/matrix-org/matrix-rust-sdk/pull/4973
* exposing said methods through FFI in https://github.com/matrix-org/matrix-rust-sdk/pull/5953

Unfortunately #5953 only theoretically exposed types as `uniffi::Object`s do not automatically publish fields over FFI, [so this change](https://github.com/matrix-org/matrix-rust-sdk/pull/6278/changes/9175220c60b933a4a355bb44ec7ad9c2b02e8079) was required.

More so, exposing direct sync timeline events (`TimelineEvent`) isn't particularly useful for final clients which generally interact with UI crate level types and aggregations. #6278 came on top to convert sync types to UI types similar to the implementation found in `LatestEvents`.

While these are all welcomed improvements **we still need the following**:

- [x] Expose the latest in-thread event and its sender profile on the ThreadListItem
- [x] Expose the number of replies in the thread
- [x] Expose unread/mention/notification states for each thread
- [ ] Aggregate unreads and expos whether there are **any** unread threads [meta](https://github.com/element-hq/element-meta/issues/2952)
- [x] Put the thread list behind a reactive interface within a new service, let's call it the `ThreadListService` (UI crate level)
- [x] Have the `ThreadListService` hold state and handle pagination
- [ ] Hook up the service to Room and EventCache updates so thread list items and the list itself automatically update
- [ ] First hit the EventCache before hitting the backend when loading thread lists

At the end of all of this we will have an API can easily power the following UI:

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.