Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit 5b7b9d0

Browse files
author
Rob Orgiu
committed
Merge branch 'refs/heads/material-1.1.0-alpha01' into Kotlin-2.0
# Conflicts: # CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt
2 parents 9563675 + 9b16e3c commit 5b7b9d0

File tree

1 file changed

+15
-12
lines changed
  • CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui

1 file changed

+15
-12
lines changed

CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,21 @@ private fun DetailContent(
302302
) {
303303
if (definedWord != null) {
304304

305-
val imageModifier = Modifier.padding(horizontal = 8.dp)
306-
if (!isListAndDetailVisible && isDetailVisible) {
307-
with(sharedTransitionScope) {
308-
val state = rememberSharedContentState(key = definedWord.word)
309-
imageModifier.then(
310-
Modifier.sharedElement(
311-
state,
312-
animatedVisibilityScope = animatedVisibilityScope
313-
)
314-
)
315-
}
316-
}
305+
val imageModifier = Modifier
306+
.padding(horizontal = 8.dp)
307+
.then(
308+
if (!isListAndDetailVisible && isDetailVisible) {
309+
with(sharedTransitionScope) {
310+
val state = rememberSharedContentState(key = definedWord.word)
311+
Modifier.sharedElement(
312+
state,
313+
animatedVisibilityScope = animatedVisibilityScope
314+
)
315+
}
316+
} else {
317+
Modifier
318+
}
319+
)
317320

318321
Image(
319322
painter = painterResource(id = definedWord.icon),

0 commit comments

Comments
 (0)