Merge pull request #877 from android/tj/scrollbars

Update feedItemsSize calculation
pull/883/head
Adetunji Dahunsi 1 year ago committed by GitHub
commit 0a20cb729b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -489,17 +489,16 @@ private fun feedItemsSize(
onboardingUiState: OnboardingUiState,
): Int {
val feedSize = when (feedState) {
NewsFeedUiState.Loading -> 1
NewsFeedUiState.Loading -> 0
is NewsFeedUiState.Success -> feedState.feed.size
}
val onboardingSize = when (onboardingUiState) {
OnboardingUiState.Loading,
OnboardingUiState.LoadFailed,
OnboardingUiState.NotShown,
-> 0
OnboardingUiState.Loading,
is OnboardingUiState.Shown,
-> 1
is OnboardingUiState.Shown -> 1
}
return feedSize + onboardingSize
}

Loading…
Cancel
Save