Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data class LeaderboardRow(
- @SerializedName("position") var position: Int? = 0,
- @SerializedName("user_id") val userId: String? = null,
- @SerializedName("user_name") val name: String? = null,
- @SerializedName("wins") var wins: Int,
- @SerializedName("balance") var available: Int? = null,
- @SerializedName("avatar") val avatar: String? = null,
- @SerializedName("in_game") val inPlay: Int? = null,
- @SerializedName("profile_stats") val profileStats : ProfileStatsResponse? = null
- ) : Cachable {
- override val hashKey: String
- get() = "${userId}"
- val topUserPointsHtml : Spanned
- get() {
- val tagOpen = "<b>"
- val tagClose = "</b>"
- val string = "{%d} (%d)".format(
- available ?: 0,
- inPlay ?: 0
- )
- .replace("{", tagOpen)
- .replace("}", tagClose)
- return Html.fromHtml(string)
- }
- val pointsHtml: Spanned
- get() {
- val tagOpen = "<font color=\"black\"><b>"
- val tagClose = "</b></font>"
- val string = "{%d} (%d)".format(
- available ?: 0,
- inPlay ?: 0
- )
- .replace("{", tagOpen)
- .replace("}", tagClose)
- return Html.fromHtml(string)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement