Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 건빵집 리스트 페이징 구현 및 리팩토링 #230

Merged
merged 16 commits into from
Feb 20, 2024

Conversation

Dan2dani
Copy link
Member

Related issue 🛠

Work Description ✏️

  • 건빵집 리스트 페이지네이션 구현
  • 건빵집 리스트 관련 필터 정보 하나로 관리하기 및 flow 통합

To Reviewers 📢

amplitude에 대한 로직 및 테스트 전입니다!!

Copy link
Member

@jooyyoo jooyyoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어렵네염 💦 수고하셨숨니당

Copy link
Collaborator

@jihyunniiii jihyunniiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

페이징 어렵네요 ㅠ

Comment on lines +15 to +30
Pager(
config = PagingConfig(
pageSize = PAGE_SIZE,
enablePlaceholders = false,
),
pagingSourceFactory = {
BakeryListPagingSource(
bakeryService = bakeryService,
sort = bakeryListFilterType.sortType.sortName,
personal = bakeryListFilterType.isPersonalFilterApplied == true,
isHard = bakeryListFilterType.isHard,
isBrunch = bakeryListFilterType.isBrunch,
isDessert = bakeryListFilterType.isDessert
)
}
).flow
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SO 신기 ~ 페이징은 이렇게 쓰는 거군요

Comment on lines 90 to 99
// viewModel.bakeryCategoryType.flowWithLifecycle(lifecycle).onEach { bakeryCategoryType ->
// val selectedCategory = bakeryCategoryType.entries.filter { it.value }.map { it.key }
// if (selectedCategory.isNotEmpty()) {
// AmplitudeUtils.trackEventWithProperties(
// CLICK_CATEGORY,
// CATEGORY,
// selectedCategory
// )
// }
// }.launchIn(lifecycleScope)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 풀어야 하지 않냐능 !!!!

fun fetchBakeryListPagingData(): Flow<PagingData<BakeryInformation>> {
return bakeryListPagingRepository.fetchBakeryList(
bakeryListFilterType = bakeryListFilterType.value
).cachedIn(viewModelScope)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

참 신기하다능,,

# Conflicts:
#	app/src/main/java/com/sopt/geonppang/presentation/bakeryList/BakeryListFragment.kt
#	app/src/main/java/com/sopt/geonppang/presentation/bakeryList/BakeryListViewModel.kt
…o feat-bakery-list-pagination

# Conflicts:
#	app/src/main/java/com/sopt/geonppang/presentation/bakeryList/BakeryListFragment.kt
@Dan2dani Dan2dani merged commit b130181 into develop Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[feat] 건빵집 리스트 페이지네이션 구현
3 participants