Skip to content

Commit 696d168

Browse files
Kishan Kumar MauryaKishan Kumar Maurya
authored andcommitted
Order by most-recently updated issue first
1 parent 8f9ad66 commit 696d168

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/main/java/com/example/githubfirebaseissue/ui/viewmodel/MainViewModel.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class MainViewModel @Inject constructor(private val useCase: GetFireBaseIssueUse
3737
.doOnSubscribe { loadingState.value = true }
3838
.doOnEvent { _, _ -> loadingState.value = false }
3939
.doOnError { loadingState.value = false }
40+
.map { it.sortedByDescending { issue -> issue.updatedAt } }
4041
.subscribe(
4142
{ Event(it).run(_issueLiveData::postValue) }
4243
,

0 commit comments

Comments
 (0)