Improve code clarity
This commit is contained in:
parent
05660fbc18
commit
4d2edfaccd
1 changed files with 3 additions and 3 deletions
|
|
@ -199,9 +199,9 @@ private fun MediaGalleryPage(
|
|||
if (groupedMediaItems.isLoadingItems(mode)) {
|
||||
// Need to trigger a pagination now if there is only one LoadingIndicator.
|
||||
val loadingItem = groupedMediaItems.dataOrNull()?.getItems(mode)?.singleOrNull() as? MediaItem.LoadingIndicator
|
||||
loadingItem?.let { item ->
|
||||
LaunchedEffect(item.timestamp) {
|
||||
state.eventSink(MediaGalleryEvents.LoadMore(item.direction))
|
||||
if (loadingItem != null) {
|
||||
LaunchedEffect(loadingItem.timestamp) {
|
||||
state.eventSink(MediaGalleryEvents.LoadMore(loadingItem.direction))
|
||||
}
|
||||
}
|
||||
LoadingContent(mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue