Add Sort Order Support for Media and Files Attachments Lists in Channel Info
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #6364 di @andremion — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- mobile-dev
Direzione di ricerca
Inizia tracciando ChannelAttachmentsViewController e ChannelAttachmentsViewModelFactory da ChannelMediaAttachmentsScreen e ChannelFilesAttachmentsScreen, quindi esamina la chiamata a chatClient.searchMessages e il comportamento esistente di headerKeySelector. Il lavoro è completato quando viene esposta un’API sortOrder retrocompatibile, viene applicata agli elenchi degli allegati e le intestazioni dei gruppi mantengono un ordinamento coerente per le date dei messaggi crescenti e decrescenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
We are using the Stream Chat Android SDK (Compose UI kit) and we have been exploring the Media
Attachments and Files Attachments screens that are accessible from the Channel Info screen
(DirectChannelInfoScreen / GroupChannelInfoScreen).
Currently, when navigating to ChannelMediaAttachmentsScreen or ChannelFilesAttachmentsScreen,
the list of attachments is loaded via ChannelAttachmentsViewController, which internally calls
chatClient.searchMessages(...) without any sort parameter. The items are displayed in the order
returned by the server, with client-side grouping by relative time span (HeaderKeySelector),
but there is no way to control the sort order (ascending or descending) from the public API.
Feature Request
We would like to request the addition of sort order support for both the media and files
attachments lists. Specifically:
-
Expose a
sortOrderparameter (e.g.,ASC/DESC) on:ChannelMediaAttachmentsScreenChannelFilesAttachmentsScreenChannelAttachmentsViewModelFactoryChannelAttachmentsViewController
-
Apply the sort order either:
- By passing a sort parameter to the
searchMessagesAPI call (if supported server-side), or - By sorting the accumulated items client-side using the message creation date
(e.g.,sortedByDescending { it.message.createdAt }).
- By passing a sort parameter to the
-
Keep the
headerKeySelectorconsistent with the chosen sort order so that group headers
(e.g., "This week", "Last month") remain logically ordered.
Current Behavior
- Attachments are returned in the order provided by the server.
- There is no public API to control or reverse the sort order.
- The only customization available is the
headerKeySelectorlambda, which groups items
but does not sort them.
Expected Behavior
- The developer should be able to configure the sort order (ascending or descending by message
creation date) when instantiating the screen or the ViewModel factory. - Default behavior should remain unchanged (backward compatible).
SDK Details
| Property | Value |
|---|---|
| Platform | Android |
| UI Kit | Jetpack Compose (stream-chat-android-compose) |
Affected components:
ChannelMediaAttachmentsScreenChannelFilesAttachmentsScreenChannelAttachmentsViewController(stream-chat-android-ui-common)ChannelAttachmentsViewModelFactoryChannelAttachmentsViewState
Thanks
- Lingua principale
- Kotlin
- Stelle
- 1.7k
- Fork
- 320
- Merge medio
- 1g 17h
- PR unite (30g)
- 85
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GetStream/stream-chat-android
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
GetStream/stream-chat-android#6556 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
GetStream/stream-chat-android#6243 ·
I maintainer di solito rispondono entro 1 giorno
-
compose feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GetStream/stream-chat-android#5612 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Should Support Larger fileApertacore feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
GetStream/stream-chat-android#5279 ·
I maintainer di solito rispondono entro 1 giorno
-
feature request ui-components
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
GetStream/stream-chat-android#5006 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GetStream/stream-chat-android
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
saisaharsh3/Leftovers#13 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
navikt/esyfo-narmesteleder#700 ·
I maintainer di solito rispondono entro 1 giorno
-
A2A agent card served at agent.json, but A2A 0.3.0 uses agent-card.jsonForse già presa @hadirsa l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
embabel/embabel-agent#2142 ·
I maintainer di solito rispondono entro 1 giorno
-
bug feedback required
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
streetcomplete/StreetComplete#7275 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Kotlin/kotlin-lsp#288 ·