fix: 首页模块共享转场
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user