Skip to content

Commit d3e0f42

Browse files
committed
🐛 운동 종료 알림 정렬이 제대로 되지 않던 버그 수정
1 parent bc07a57 commit d3e0f42

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

presentation/src/main/java/com/whyranoid/presentation/community/group/detail/GroupDetailFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import com.whyranoid.presentation.base.BaseFragment
1313
import com.whyranoid.presentation.databinding.FragmentGroupDetailBinding
1414
import com.whyranoid.presentation.util.repeatWhenUiStarted
1515
import dagger.hilt.android.AndroidEntryPoint
16+
import kotlinx.coroutines.flow.collectLatest
1617
import kotlinx.coroutines.launch
1718

1819
@AndroidEntryPoint
@@ -150,7 +151,7 @@ internal class GroupDetailFragment :
150151

151152
binding.notificationRecyclerView.adapter = notificationAdapter
152153
viewLifecycleOwner.repeatWhenUiStarted {
153-
viewModel.mergedNotifications.collect { notifications ->
154+
viewModel.mergedNotifications.collectLatest { notifications ->
154155
notificationAdapter.submitList(notifications)
155156
}
156157
}

presentation/src/main/java/com/whyranoid/presentation/community/group/detail/GroupDetailViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class GroupDetailViewModel @Inject constructor(
7474
.sortedBy { notification ->
7575
when (notification) {
7676
is StartNotification -> notification.startedAt
77-
is FinishNotification -> notification.runningHistory.startedAt
77+
is FinishNotification -> notification.runningHistory.finishedAt
7878
}
7979
}
8080
}.launchIn(viewModelScope)

0 commit comments

Comments
 (0)