Skip to content

Commit cd0c167

Browse files
committed
🚚 event() -> emitEvent()로 변경, 변수명 adapter -> myGroupAdapter로 변경
1 parent 449826f commit cd0c167

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

presentation/src/main/java/com/whyranoid/presentation/community/CommunityItemFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ internal class CommunityItemFragment :
7373

7474
// TODO 카테고리 별 다른 아이템 처리
7575
private fun setMyGroupAdapter() {
76-
val adapter = MyGroupAdapter { groupInfo ->
76+
val myGroupAdapter = MyGroupAdapter { groupInfo ->
7777
viewModel.onCategoryItemClicked(groupInfo)
7878
}
79-
binding.rvCommunity.adapter = adapter
79+
binding.rvCommunity.adapter = myGroupAdapter
8080

8181
viewLifecycleOwner.lifecycleScope.launch {
8282
viewModel.getMyGroupListUseCase().collect { groupList ->
8383
removeShimmer()
84-
adapter.submitList(groupList.sortedBy { it.name })
84+
myGroupAdapter.submitList(groupList.sortedBy { it.name })
8585
}
8686
}
8787
}

presentation/src/main/java/com/whyranoid/presentation/community/CommunityViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class CommunityViewModel @Inject constructor(
2121
get() = _eventFlow.asSharedFlow()
2222

2323
fun onCategoryItemClicked(groupInfo: GroupInfo) {
24-
event(Event.CategoryItemClick(groupInfo))
24+
emitEvent(Event.CategoryItemClick(groupInfo))
2525
}
2626

27-
private fun event(event: Event) {
27+
private fun emitEvent(event: Event) {
2828
viewModelScope.launch {
2929
_eventFlow.emit(event)
3030
}

0 commit comments

Comments
 (0)