Make ShimmerHost do not fillParentMaxSize if continuing
This commit is contained in:
@@ -103,11 +103,14 @@ inline fun <T : Innertube.Item> ItemsPage(
|
|||||||
|
|
||||||
if (!(itemsPage != null && itemsPage?.continuation == null)) {
|
if (!(itemsPage != null && itemsPage?.continuation == null)) {
|
||||||
item(key = "loading") {
|
item(key = "loading") {
|
||||||
|
val isFirstLoad = itemsPage?.items.isNullOrEmpty()
|
||||||
ShimmerHost(
|
ShimmerHost(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillParentMaxSize()
|
.run {
|
||||||
|
if (isFirstLoad) fillParentMaxSize() else this
|
||||||
|
}
|
||||||
) {
|
) {
|
||||||
repeat(if (itemsPage?.items.isNullOrEmpty()) initialPlaceholderCount else continuationPlaceholderCount) {
|
repeat(if (isFirstLoad) initialPlaceholderCount else continuationPlaceholderCount) {
|
||||||
itemPlaceholderContent()
|
itemPlaceholderContent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user