mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Add documentation on buildMediaViewerPageList.
This commit is contained in:
+5
@@ -102,6 +102,11 @@ class MediaViewerDataSource(
|
|||||||
return buildMediaViewerPageList(initialMediaItems)
|
return buildMediaViewerPageList(initialMediaItems)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build a list of [MediaViewerPageData] from a list of [MediaItem].
|
||||||
|
* In particular, create a mutable state of AsyncData<LocalMedia> for each media item, which
|
||||||
|
* will be used to render the downloaded media (see [loadMedia] which will update this value).
|
||||||
|
*/
|
||||||
private fun buildMediaViewerPageList(groupedItems: List<MediaItem>) = buildList {
|
private fun buildMediaViewerPageList(groupedItems: List<MediaItem>) = buildList {
|
||||||
groupedItems.forEach { mediaItem ->
|
groupedItems.forEach { mediaItem ->
|
||||||
when (mediaItem) {
|
when (mediaItem) {
|
||||||
|
|||||||
Reference in New Issue
Block a user