Skip to content

Commit

Permalink
add processing of locked badges from backend
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkash committed Jul 27, 2023
1 parent 3f59fe1 commit dd5e4aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class BadgesViewStateMapper(
}

fun map(state: ProfileFeature.BadgesState): BadgesViewState {
val unlockedBadges = state.badges.sortedBy { it.level }.map(::mapUnlockedBadge)
val lockedBadges = getLockedBadgeKinds(state.badges.map { it.kind }).map(::mapLockedBadge)
val unlockedBadges = state.badges.filter { it.level > 0 }.sortedBy { it.level }.map(::mapUnlockedBadge)
val lockedBadges = getLockedBadgeKinds(unlockedBadges.map { it.kind }).map(::mapLockedBadge)
val allBadges = unlockedBadges + lockedBadges

return BadgesViewState(
Expand Down

0 comments on commit dd5e4aa

Please sign in to comment.