From 92e243245c29012fc63badedc0b6a445382afa5a Mon Sep 17 00:00:00 2001 From: ki960213 Date: Wed, 7 Feb 2024 18:04:32 +0900 Subject: [PATCH] =?UTF-8?q?feat(CompetitionFragment):=20RecyclerViewPreloa?= =?UTF-8?q?der=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/competitionList/CompetitionFragment.kt | 10 +++++++--- .../ui/conferenceList/ConferenceFragment.kt | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/competitionList/CompetitionFragment.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/competitionList/CompetitionFragment.kt index 897e14017..2bc8f3d4b 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/competitionList/CompetitionFragment.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/competitionList/CompetitionFragment.kt @@ -14,9 +14,9 @@ import com.emmsale.presentation.common.extension.getSerializableExtraCompat import com.emmsale.presentation.common.views.FilterTag import com.emmsale.presentation.common.views.filterChipOf import com.emmsale.presentation.ui.competitionFilter.CompetitionFilterActivity -import com.emmsale.presentation.ui.competitionList.recyclerView.CompetitionRecyclerViewAdapter import com.emmsale.presentation.ui.competitionList.uiState.CompetitionSelectedFilteringDateOptionUiState import com.emmsale.presentation.ui.competitionList.uiState.CompetitionSelectedFilteringOptionUiState +import com.emmsale.presentation.ui.conferenceList.recyclerView.EventRecyclerViewAdapter import com.emmsale.presentation.ui.eventDetail.EventDetailActivity import dagger.hilt.android.AndroidEntryPoint import java.time.LocalDate @@ -26,8 +26,12 @@ class CompetitionFragment : BaseFragment(R.layout.fragment_competition) { private val viewModel: CompetitionViewModel by viewModels() - private val eventAdapter: CompetitionRecyclerViewAdapter by lazy { - CompetitionRecyclerViewAdapter(::navigateToEventDetail) + private val eventAdapter: EventRecyclerViewAdapter by lazy { + EventRecyclerViewAdapter( + fragment = this, + onClickConference = ::navigateToEventDetail, + onPreloaderReady = { binding.rvEvents.addOnScrollListener(it) }, + ) } private val filterActivityLauncher = registerForActivityResult(StartActivityForResult()) { result -> diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/conferenceList/ConferenceFragment.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/conferenceList/ConferenceFragment.kt index 2f99cfb3f..c8f4c3257 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/conferenceList/ConferenceFragment.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/conferenceList/ConferenceFragment.kt @@ -25,7 +25,7 @@ import java.time.LocalDate class ConferenceFragment : BaseFragment(R.layout.fragment_conference) { private val viewModel: ConferenceViewModel by viewModels() - private val eventAdapter by lazy { + private val eventAdapter: EventRecyclerViewAdapter by lazy { EventRecyclerViewAdapter( fragment = this, onClickConference = ::navigateToEventDetail,