-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
(건빵집 리스트에 영향을 미치는 요소들)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어렵네염 💦 수고하셨숨니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
페이징 어렵네요 ㅠ
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SO 신기 ~ 페이징은 이렇게 쓰는 거군요
// 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
Related issue 🛠
Work Description ✏️
To Reviewers 📢
amplitude에 대한 로직 및 테스트 전입니다!!