Conversation
- Add `ThreadsListService` to subscribe to thread changes in the room. - Create `ThreadsListView` and its associated node a presenters (the UI may change). - Add a menu icon in the room screen to open it. This is still pending info about unread threads, so several UI components related to it will be hidden.
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #6575 +/- ##
===========================================
+ Coverage 81.02% 81.05% +0.02%
===========================================
Files 2595 2602 +7
Lines 71719 72080 +361
Branches 9288 9322 +34
===========================================
+ Hits 58113 58427 +314
- Misses 10192 10222 +30
- Partials 3414 3431 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ganfra
left a comment
There was a problem hiding this comment.
Some small remarks, otherwise LGTM!
| contentPadding = padding, | ||
| state = lazyListState, | ||
| ) { | ||
| itemsIndexed(state.threads, key = { _, row -> row.item.threadId }) { index, threadItem -> |
There was a problem hiding this comment.
why calling it row and then threadItem?
There was a problem hiding this comment.
No real reason, I've renamed it.
| url = state.roomAvatarUrl, | ||
| size = AvatarSize.CurrentUserTopBar, | ||
| ), | ||
| avatarType = AvatarType.Room(), |
There was a problem hiding this comment.
Should we fill the isTombstoned?
| } | ||
| } | ||
|
|
||
| private fun List<ThreadListUpdate>.apply( |
There was a problem hiding this comment.
Maybe create the extension method on the list instead? Also maybe we should use a mutable list?
|
|
||
| override fun destroy() { | ||
| if (itemSubscriptionJob?.isActive == true) { | ||
| itemSubscriptionJob?.cancel() |
There was a problem hiding this comment.
just call cancel? the check is already done internally no?
| } | ||
|
|
||
| override fun subscribeToPaginationUpdates(): Flow<ThreadListPaginationStatus> { | ||
| return callbackFlow { |
| } | ||
|
|
||
| private fun doSubscribeToItemUpdates(): Job { | ||
| val updatesFlow = callbackFlow { |
|



Content
Adds a new room threads list screen that will appear for rooms which have threads in them.
This will fetch the list of threads in a room, and paginate as you scroll. When one of the items is selected, it'll open the associated thread.
This is hidden behind a new feature flag.
Note this is a WIP feature: it lacks info for unread threads, empty threads screen if we'd rather use that instead of hiding the menu button, and the designs are not final.
Motivation and context
Part of #6354.
Screenshots / GIFs
Tests
Tested devices
Checklist