Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 553740a6 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Android (Google) Code Review
Browse files

Merge "[Expandable] Add isAttached check in onGloballyPositioned" into main

parents 8aaccfe3 d767a578
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -311,7 +311,11 @@ fun Expandable(
                    .then(clickModifier(controller, onClick, onClickLabel, interactionSource))
                    .animatedBackground(color, shape = shape)
                    .border(controller)
                    .onGloballyPositioned { controller.boundsInComposeViewRoot = it.boundsInRoot() }
                    .onGloballyPositioned {
                        if (it.isAttached) {
                            controller.boundsInComposeViewRoot = it.boundsInRoot()
                        }
                    }
            ) {
                wrappedContent(controller.expandable)
            }