HapeLee 5 месяцев назад
Родитель
Сommit
134118011a

+ 11 - 0
app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt

@@ -267,6 +267,17 @@ class SearchViewModel(
             }
 
             is SearchIntent.OpenExpandedSourceBook -> {
+                _uiState.update {
+                    it.copy(
+                        expandedSourceUrl = null,
+                        expandedSourceName = null,
+                        expandedSourceBooks = persistentListOf(),
+                        expandedSourceLoading = false,
+                        expandedSourceEnd = false,
+                        expandedSourceError = null,
+                        expandedSourcePage = 1,
+                    )
+                }
                 emitEffect(
                     SearchEffect.OpenBookInfo(
                         name = intent.book.name,

+ 0 - 11
app/src/main/java/io/legado/app/ui/main/homepage/modules/BannerModule.kt

@@ -68,17 +68,6 @@ fun BannerModule(
                         .combinedClickable(
                             onClick = { onClick(book, sharedCoverKey) },
                             onLongClick = onLongClick?.let { cb -> { cb(book, sharedCoverKey) } }
-                        )
-                        .then(
-                            with(sharedTransitionScope) {
-                                if (this != null) {
-                                    Modifier.sharedBounds(
-                                        sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
-                                        animatedVisibilityScope = animatedVisibilityScope
-                                            ?: return@with Modifier,
-                                    )
-                                } else Modifier
-                            }
                         ),
                     sharedTransitionScope = sharedTransitionScope,
                     animatedVisibilityScope = animatedVisibilityScope,

+ 0 - 22
app/src/main/java/io/legado/app/ui/widget/components/book/SearchBookItem.kt

@@ -64,17 +64,6 @@ fun SearchBookListItem(
                 ) else Modifier
             )
             .then(if (showPadding) Modifier.adaptiveHorizontalPadding(vertical = 8.dp) else Modifier)
-            .then(
-                with(sharedTransitionScope) {
-                    if (this != null) {
-                        Modifier.sharedBounds(
-                            sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
-                            animatedVisibilityScope = animatedVisibilityScope
-                                ?: return@with Modifier,
-                        )
-                    } else Modifier
-                }
-            )
     ) {
         Box(modifier = Modifier
             .width(72.dp)
@@ -204,17 +193,6 @@ fun SearchBookGridItem(
                 onClick = onClick,
                 onLongClick = onLongClick?.let { cb -> { cb(book, sharedCoverKey) } }
             )
-            .then(
-                with(sharedTransitionScope) {
-                    if (this != null) {
-                        Modifier.sharedBounds(
-                            sharedContentState = rememberSharedContentState("preview:${book.bookUrl}"),
-                            animatedVisibilityScope = animatedVisibilityScope
-                                ?: return@with Modifier,
-                        )
-                    } else Modifier
-                }
-            )
     ) {
         Box(
             modifier = Modifier