fix: 首页模块共享转场
This commit is contained in:
@@ -79,7 +79,7 @@ fun CardModule(
|
||||
with(sharedTransitionScope) {
|
||||
if (this != null) {
|
||||
Modifier.sharedBounds(
|
||||
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
|
||||
sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
|
||||
animatedVisibilityScope = animatedVisibilityScope
|
||||
?: return@with Modifier,
|
||||
)
|
||||
|
||||
@@ -130,7 +130,7 @@ private fun GridRankingItem(
|
||||
with(sharedTransitionScope) {
|
||||
if (this != null) {
|
||||
Modifier.sharedBounds(
|
||||
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
|
||||
sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
|
||||
animatedVisibilityScope = animatedVisibilityScope
|
||||
?: return@with Modifier,
|
||||
)
|
||||
|
||||
@@ -143,7 +143,7 @@ private fun RankingItem(
|
||||
with(sharedTransitionScope) {
|
||||
if (this != null) {
|
||||
Modifier.sharedBounds(
|
||||
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
|
||||
sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
|
||||
animatedVisibilityScope = animatedVisibilityScope
|
||||
?: return@with Modifier,
|
||||
)
|
||||
|
||||
@@ -52,7 +52,7 @@ fun WaterfallItem(
|
||||
modifier = with(sharedTransitionScope) {
|
||||
if (this != null) {
|
||||
Modifier.sharedBounds(
|
||||
sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
|
||||
sharedContentState = rememberSharedContentState("preview:$sharedCoverKey"),
|
||||
animatedVisibilityScope = animatedVisibilityScope ?: return@with Modifier,
|
||||
)
|
||||
} else Modifier
|
||||
|
||||
Reference in New Issue
Block a user