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)) {
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue