From 9c22af19eb98f06a8d025f5b302a10855df97241 Mon Sep 17 00:00:00 2001 From: mlykotom Date: Tue, 29 Nov 2022 19:08:18 +0100 Subject: [PATCH] Rename variables Change-Id: Iccfc7cdd76c8ad1c866eeff8d621952c3e9c4db6 --- .../apps/nowinandroid/feature/foryou/ForYouScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(),