pull/1771/head
kunfei 3 years ago
parent 6c40be6cb1
commit 8fc9394b63
  1. 4
      app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt

@ -59,9 +59,7 @@ class ExploreAdapter(context: Context, val callBack: CallBack) :
Coroutine.async(callBack.scope) { Coroutine.async(callBack.scope) {
item.exploreKinds item.exploreKinds
}.onSuccess { kindList -> }.onSuccess { kindList ->
kotlin.runCatching {
upKindList(flexbox, item.bookSourceUrl, kindList) upKindList(flexbox, item.bookSourceUrl, kindList)
}
}.onFinally { }.onFinally {
rotateLoading.hide() rotateLoading.hide()
if (scrollTo >= 0) { if (scrollTo >= 0) {
@ -79,7 +77,7 @@ class ExploreAdapter(context: Context, val callBack: CallBack) :
} }
private fun upKindList(flexbox: FlexboxLayout, sourceUrl: String, kinds: List<ExploreKind>) { private fun upKindList(flexbox: FlexboxLayout, sourceUrl: String, kinds: List<ExploreKind>) {
if (!kinds.isNullOrEmpty()) { if (!kinds.isNullOrEmpty()) kotlin.runCatching {
recyclerFlexbox(flexbox) recyclerFlexbox(flexbox)
flexbox.visible() flexbox.visible()
kinds.forEach { kind -> kinds.forEach { kind ->

Loading…
Cancel
Save