|
|
@ -166,8 +166,13 @@ fun ForYouScreen(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Workaround to call Activity.reportFullyDrawn from Jetpack Compose.
|
|
|
|
// 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.
|
|
|
|
// This code should be called when the UI is ready for use
|
|
|
|
if (interestsSelectionState !is ForYouInterestsSelectionUiState.Loading && feedState !is ForYouFeedUiState.Loading) {
|
|
|
|
// and relates to Time To Full Display.
|
|
|
|
|
|
|
|
val interestsLoaded =
|
|
|
|
|
|
|
|
interestsSelectionState !is ForYouInterestsSelectionUiState.Loading
|
|
|
|
|
|
|
|
val feedLoaded = feedState !is ForYouFeedUiState.Loading
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (interestsLoaded && feedLoaded) {
|
|
|
|
val localView = LocalView.current
|
|
|
|
val localView = LocalView.current
|
|
|
|
// Unit prevents calling it only once on recomposition, but doesn't prevent when the composable goes out of scope.
|
|
|
|
// Unit prevents calling it only once on recomposition, but doesn't prevent when the composable goes out of scope.
|
|
|
|
// Activity.reportFullyDrawn has inside check to be called only once.
|
|
|
|
// Activity.reportFullyDrawn has inside check to be called only once.
|
|
|
|