Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add Sort Order Support for Media and Files Attachments Lists in Channel Info

Aperta
#6,359 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Stack tecnologico
android, kotlin
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

feature request

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:

  1. Expose a sortOrder parameter (e.g., ASC / DESC) on:

    • ChannelMediaAttachmentsScreen
    • ChannelFilesAttachmentsScreen
    • ChannelAttachmentsViewModelFactory
    • ChannelAttachmentsViewController
  2. Apply the sort order either:

    • By passing a sort parameter to the searchMessages API call (if supported server-side), or
    • By sorting the accumulated items client-side using the message creation date
      (e.g., sortedByDescending { it.message.createdAt }).
  3. Keep the headerKeySelector consistent 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 headerKeySelector lambda, 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:

  • ChannelMediaAttachmentsScreen
  • ChannelFilesAttachmentsScreen
  • ChannelAttachmentsViewController (stream-chat-android-ui-common)
  • ChannelAttachmentsViewModelFactory
  • ChannelAttachmentsViewState

Thanks

Lingua principale
Kotlin
Stelle
1.7k
Fork
320
Merge medio
1g 17h
PR unite (30g)
85

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GetStream/stream-chat-android

Tutte le issue di GetStream/stream-chat-android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.