Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Rename variables

mlykotom9c22af19eb98
diff --git a/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt b/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
index c8b083f7c..b4427b39b 100644
--- a/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
+++ b/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
@@ -126,14 +126,14 @@ internal fun ForYouScreen(
onNewsResourcesCheckedChanged: (String, Boolean) -> Unit,
modifier: Modifier = Modifier,
) {
- val onboardingLoading = onboardingUiState is OnboardingUiState.Loading
- val feedLoading = feedState is NewsFeedUiState.Loading
+ val isOnboardingLoading = onboardingUiState is OnboardingUiState.Loading
+ val isFeedLoading = feedState is NewsFeedUiState.Loading
// Workaround to call Activity.reportFullyDrawn from Jetpack Compose.
// This code should be called when the UI is ready for use
// and relates to Time To Full Display.
// TODO replace with ReportDrawnWhen { } once androidx.activity-compose 1.7.0 is used (currently alpha)
- if (!isSyncing && !onboardingLoading && !feedLoading) {
+ if (!isSyncing && !isOnboardingLoading && !isFeedLoading) {
val localView = LocalView.current
// We use Unit to call reportFullyDrawn only on the first recomposition,
// however it will be called again if this composable goes out of scope.
@@ -195,7 +195,7 @@ internal fun ForYouScreen(
}
}
AnimatedVisibility(
- visible = isSyncing || feedLoading || onboardingLoading,
+ visible = isSyncing || isFeedLoading || isOnboardingLoading,
enter = slideInVertically(
initialOffsetY = { fullHeight -> -fullHeight },
) + fadeIn(),