Skip to content

Commit

Permalink
Same sorting for cloud and cache VC lists
Browse files Browse the repository at this point in the history
Close #64
  • Loading branch information
alexandr7035 committed Mar 3, 2023
1 parent 948e082 commit 3b7d18c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class StoredCredentialsRepositoryImpl @Inject constructor(
val cacheCredentials = credentialsCacheDataSource.getCredentialsFromCache() as DataCredentialsList.Success
val domainCache = cacheCredentials.signedCredentials.map {
mapper.map(it)
}.sortedByDescending {
it.issuanceDate
}

// Always try firstly return cache
Expand Down Expand Up @@ -73,6 +75,8 @@ class StoredCredentialsRepositoryImpl @Inject constructor(

val domainCloud = cloudCredentials.signedCredentials.map {
mapper.map(it)
}.sortedByDescending {
it.issuanceDate
}

emit(CredentialsListResModel.Success(credentials = domainCloud))
Expand Down

0 comments on commit 3b7d18c

Please sign in to comment.