Make ShimmerHost do not fillParentMaxSize if continuing
This commit is contained in:
parent
b02192d828
commit
8f588f6dce
1 changed files with 5 additions and 2 deletions
|
@ -103,11 +103,14 @@ inline fun <T : Innertube.Item> ItemsPage(
|
|||
|
||||
if (!(itemsPage != null && itemsPage?.continuation == null)) {
|
||||
item(key = "loading") {
|
||||
val isFirstLoad = itemsPage?.items.isNullOrEmpty()
|
||||
ShimmerHost(
|
||||
modifier = Modifier
|
||||
.fillParentMaxSize()
|
||||
.run {
|
||||
if (isFirstLoad) fillParentMaxSize() else this
|
||||
}
|
||||
) {
|
||||
repeat(if (itemsPage?.items.isNullOrEmpty()) initialPlaceholderCount else continuationPlaceholderCount) {
|
||||
repeat(if (isFirstLoad) initialPlaceholderCount else continuationPlaceholderCount) {
|
||||
itemPlaceholderContent()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue