Skip to content

Commit 99f5d66

Browse files
committed
[REFACTOR] #286 배너 초기 위치 상수화
1 parent 3bebb27 commit 99f5d66

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/main/java/com/runnect/runnect/presentation/discover/DiscoverFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class DiscoverFragment : BindingFragment<FragmentDiscoverBinding>(R.layout.fragm
109109
}
110110

111111
private fun initBannerViewPagerItemPosition() {
112-
currentBannerPosition = Int.MAX_VALUE / 2
112+
currentBannerPosition = CENTER_POS_OF_INFINITE_BANNERS
113113
binding.vpDiscoverBanner.setCurrentItem(currentBannerPosition, false)
114114
}
115115

@@ -412,6 +412,7 @@ class DiscoverFragment : BindingFragment<FragmentDiscoverBinding>(R.layout.fragm
412412

413413
companion object {
414414
private const val BANNER_SCROLL_DELAY_TIME = 5000L
415+
private const val CENTER_POS_OF_INFINITE_BANNERS = Int.MAX_VALUE / 2
415416
private const val EXTRA_PUBLIC_COURSE_ID = "publicCourseId"
416417
private const val EXTRA_ROOT_SCREEN = "rootScreen"
417418
const val EXTRA_EDITABLE_DISCOVER_COURSE = "editable_discover_course"

0 commit comments

Comments
 (0)