Skip to content

Commit

Permalink
Turn off during startup: fix bug
Browse files Browse the repository at this point in the history
Reviewed By: parth-menon

Differential Revision: D65248035

fbshipit-source-id: 2442da96c126b1840ca56025f8bb35148dfe6177
  • Loading branch information
Artem Kholodnyi authored and facebook-github-bot committed Oct 31, 2024
1 parent f224fe7 commit 8e79c29
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,8 @@ object FrescoVitoImage2Spec {
@Prop(optional = true) imageOptions: ImageOptions?,
@Prop(optional = true) logWithHighSamplingRate: Boolean?,
): VitoImageRequest? {
val config = FrescoVitoProvider.getConfig()
val shouldCreateRequest =
if (config.experimentalDynamicSizeDisableWhenAppIsStarting() && config.isAppStarting()) {
// App is still starting
true
} else if (experimentalDynamicSizeVito2() &&
!experimentalDynamicSizeWithCacheFallbackVito2()) {
if (experimentalDynamicSizeVito2() && !experimentalDynamicSizeWithCacheFallbackVito2()) {
// we won't do anything with the original URI, so we can just return null
false
} else {
Expand Down Expand Up @@ -183,6 +178,10 @@ object FrescoVitoImage2Spec {
forceKeepOriginalSize.set(!experimentalDynamicSizeOnPrepareMainThreadVito2())
} else if (isProductEnabled(callerContext, contextChain) == false) {
forceKeepOriginalSize.set(true)
} else if (FrescoVitoProvider.getConfig().experimentalDynamicSizeDisableWhenAppIsStarting() &&
FrescoVitoProvider.getConfig().isAppStarting()) {
// App is still starting
forceKeepOriginalSize.set(true)
} else {
forceKeepOriginalSize.set(
FrescoVitoProvider.getImagePipeline()
Expand Down

0 comments on commit 8e79c29

Please sign in to comment.