|
|
@ -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 -> |
|
|
|