fix:小时榜上一名差值 最大显示999w+

This commit is contained in:
Max
2023-11-08 18:10:13 +08:00
parent 30e468bdf3
commit c68419f2af

View File

@@ -118,7 +118,11 @@ class RoomHourRankWidget : FrameLayout, ILog {
}
private fun updateDiff(diff: Long) {
val value = FormatUtils.formatUnit(diff, 10000, "w")
val value = if (diff >= (1000 * 10000)) {
"999w+"
} else {
FormatUtils.formatUnit(diff, 10000, "w")
}
SpannableTextBuilder(binding.tvDiff).appendText(
"距上一名差 ",
textColor = context.getColorById(R.color.white)