Skip to content

Commit

Permalink
refactor(ScrollTopListener): 메서드 배치 순서 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdgh1592 committed Nov 8, 2023
1 parent 64fabd3 commit fe48445
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ class ScrollTopListener(
targetView.isVisible = isVisibleTargetView(lastVisibleItemPosition)
}

private fun isVisibleTargetView(lastVisibleItemPosition: Int) =
lastVisibleItemPosition >= scrollUpStandardPosition

private fun setupTargetViewClickListener(recyclerView: RecyclerView) {
if (targetView.hasOnClickListeners()) return

Expand All @@ -46,6 +43,9 @@ class ScrollTopListener(
}
}

private fun isVisibleTargetView(lastVisibleItemPosition: Int) =
lastVisibleItemPosition >= scrollUpStandardPosition

companion object {
private const val PORTRAIT_SCROLL_UP_STANDARD_POSITION = 3
private const val LANDSCAPE_SCROLL_UP_STANDARD_POSITION = 6
Expand Down

0 comments on commit fe48445

Please sign in to comment.