Skip to content

Commit

Permalink
去掉 setCurrentItem() 方法调用时的滚动状态判断
Browse files Browse the repository at this point in the history
  • Loading branch information
XuQK committed Aug 26, 2021
1 parent 8abe440 commit 3337190
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class KDTabLayout @JvmOverloads constructor(
}

fun setCurrentItem(position: Int, smooth: Boolean = true) {
if (currentItem == position || scrollState != SCROLL_STATE_IDLE) return
if (currentItem == position) return

if (smooth) {
smoothScrollToItem(position)
Expand Down

0 comments on commit 3337190

Please sign in to comment.