File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
presentation/src/main/java/com/whyranoid/presentation/community/group/detail Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import com.whyranoid.presentation.base.BaseFragment
13
13
import com.whyranoid.presentation.databinding.FragmentGroupDetailBinding
14
14
import com.whyranoid.presentation.util.repeatWhenUiStarted
15
15
import dagger.hilt.android.AndroidEntryPoint
16
+ import kotlinx.coroutines.flow.collectLatest
16
17
import kotlinx.coroutines.launch
17
18
18
19
@AndroidEntryPoint
@@ -150,7 +151,7 @@ internal class GroupDetailFragment :
150
151
151
152
binding.notificationRecyclerView.adapter = notificationAdapter
152
153
viewLifecycleOwner.repeatWhenUiStarted {
153
- viewModel.mergedNotifications.collect { notifications ->
154
+ viewModel.mergedNotifications.collectLatest { notifications ->
154
155
notificationAdapter.submitList(notifications)
155
156
}
156
157
}
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class GroupDetailViewModel @Inject constructor(
74
74
.sortedBy { notification ->
75
75
when (notification) {
76
76
is StartNotification -> notification.startedAt
77
- is FinishNotification -> notification.runningHistory.startedAt
77
+ is FinishNotification -> notification.runningHistory.finishedAt
78
78
}
79
79
}
80
80
}.launchIn(viewModelScope)
You can’t perform that action at this time.
0 commit comments