feat: 优化代码

pull/103/head
kunfei 5 years ago
parent df5395f9a3
commit fb831f5df6
  1. 2
      app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt
  2. 2
      app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt

@ -78,7 +78,9 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca
if (exIndex != -1) {
notifyItemChanged(position, false)
}
postDelayed({
callBack.scrollTo(position)
}, 200)
}
ll_title.onLongClick {
showMenu(ll_title, holder.layoutPosition)

@ -133,7 +133,7 @@ class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_find_
}
override fun scrollTo(pos: Int) {
rv_find.smoothScrollToPosition(pos)
(rv_find.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(pos, 0)
}
override fun openExplore(sourceUrl: String, title: String, exploreUrl: String) {

Loading…
Cancel
Save