Created
February 24, 2021 12:10
-
-
Save TorkelV/8b377afe6e6eeede1b45b4d056237f20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun getLeaders(lastVisibleItem: Flow<Int>): Flow<List<User>> = | |
collection("users") | |
.whereGreaterThan("points", 0) | |
.orderBy("points", Query.Direction.DESCENDING) | |
.paginate(lastVisibleItem) | |
.map { docs -> docs.map { it.toUserDto().toUser() } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment