Skip to content

Commit

Permalink
Set modal size once
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Jun 3, 2024
1 parent 033a55f commit 5db452f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ public class ReactModalHostManager :
props: ReactStylesDiffMap,
stateWrapper: StateWrapper
): Any? {
val isInitialState = view.stateWrapper == null

view.stateWrapper = stateWrapper
val modalSize = getModalHostSize(view.context)
view.updateState(modalSize.x, modalSize.y)
if (isInitialState) {
val modalSize = getModalHostSize(view.context)
view.updateState(modalSize.x, modalSize.y)
}
return null
}

Expand Down

0 comments on commit 5db452f

Please sign in to comment.