Skip to content

Commit

Permalink
Fix not applying StateListAnimator to View-based MountSpecs & Primiti…
Browse files Browse the repository at this point in the history
…ve components

Summary: StateListAnimator was only set to HostComponents (when component is wrapped in a View), not the originally View-based ones

Reviewed By: adityasharat

Differential Revision: D51525557

fbshipit-source-id: 21678d9f2cf44016088bef1fb1b5d51405ca1275
  • Loading branch information
colriot authored and facebook-github-bot committed Nov 22, 2023
1 parent cf34c11 commit 3ab49bb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions litho-core/src/main/java/com/facebook/litho/LithoNodeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,10 @@ object LithoNodeUtils {
attrs.layoutDirection = result.resolvedLayoutDirection
attrs.layerType = lithoNode.layerType
attrs.layoutPaint = lithoNode.layerPaint
if (attrs.isHostSpec) {
if (lithoNode.hasStateListAnimatorResSet()) {
attrs.stateListAnimatorRes = lithoNode.stateListAnimatorRes
} else {
attrs.stateListAnimator = lithoNode.stateListAnimator
}
if (lithoNode.hasStateListAnimatorResSet()) {
attrs.stateListAnimatorRes = lithoNode.stateListAnimatorRes
} else {
attrs.stateListAnimator = lithoNode.stateListAnimator
}
}
return attrs
Expand Down

0 comments on commit 3ab49bb

Please sign in to comment.