fix: 首页模块共享转场

This commit is contained in:
HapeLee
2026-06-15 23:42:28 +08:00
parent 41923b48e2
commit bd81f3cd36
4 changed files with 4 additions and 4 deletions
@@ -79,7 +79,7 @@ fun CardModule(
with(sharedTransitionScope) { with(sharedTransitionScope) {
if (this != null) { if (this != null) {
Modifier.sharedBounds( Modifier.sharedBounds(
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"), sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
animatedVisibilityScope = animatedVisibilityScope animatedVisibilityScope = animatedVisibilityScope
?: return@with Modifier, ?: return@with Modifier,
) )
@@ -130,7 +130,7 @@ private fun GridRankingItem(
with(sharedTransitionScope) { with(sharedTransitionScope) {
if (this != null) { if (this != null) {
Modifier.sharedBounds( Modifier.sharedBounds(
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"), sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
animatedVisibilityScope = animatedVisibilityScope animatedVisibilityScope = animatedVisibilityScope
?: return@with Modifier, ?: return@with Modifier,
) )
@@ -143,7 +143,7 @@ private fun RankingItem(
with(sharedTransitionScope) { with(sharedTransitionScope) {
if (this != null) { if (this != null) {
Modifier.sharedBounds( Modifier.sharedBounds(
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"), sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
animatedVisibilityScope = animatedVisibilityScope animatedVisibilityScope = animatedVisibilityScope
?: return@with Modifier, ?: return@with Modifier,
) )
@@ -52,7 +52,7 @@ fun WaterfallItem(
modifier = with(sharedTransitionScope) { modifier = with(sharedTransitionScope) {
if (this != null) { if (this != null) {
Modifier.sharedBounds( Modifier.sharedBounds(
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"), sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
animatedVisibilityScope = animatedVisibilityScope ?: return@with Modifier, animatedVisibilityScope = animatedVisibilityScope ?: return@with Modifier,
) )
} else Modifier } else Modifier