Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
#111. Add review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
evtushenko-bogdan committed Aug 16, 2018
1 parent 511ddec commit 84b098f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class MainActivity : AppCompatActivity(), SwipeRefreshLayout.OnRefreshListener,
userList?.let {
when (counterIcon) {
0 -> userAdapter.setItems(it.reversed())
1 -> userAdapter.setItems(it.sortedBy(User::rating))
2 -> userAdapter.setItems(it.sortedByDescending(User::rating))
1 -> userAdapter.setItems(it.sortedByDescending(User::rating))
2 -> userAdapter.setItems(it.sortedBy(User::rating))
}
}
})
Expand All @@ -115,13 +115,13 @@ class MainActivity : AppCompatActivity(), SwipeRefreshLayout.OnRefreshListener,
item.icon = resources.getDrawable(R.drawable.ic_sort_descending_grey)
}
1 -> {
userAdapter.setItems(users.sortedBy { it.rating })
item.icon = resources.getDrawable(R.drawable.ic_sort_ascending)
}
2 -> {
userAdapter.setItems(users.sortedByDescending { it.rating })
item.icon = resources.getDrawable(R.drawable.ic_sort_descending_white)
}
2 -> {
userAdapter.setItems(users.sortedBy { it.rating })
item.icon = resources.getDrawable(R.drawable.ic_sort_ascending)
}
}
}

Expand Down

0 comments on commit 84b098f

Please sign in to comment.