Use more orEmpty extensions (#3399)
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/or-empty.html https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/or-empty.html
This commit is contained in:
parent
ed188783de
commit
ca29ee2b0b
13 changed files with 17 additions and 17 deletions
|
|
@ -72,7 +72,7 @@ class TrendingAdapter(
|
|||
is TrendingViewData.Tag -> {
|
||||
val maxTrendingValue = currentList
|
||||
.flatMap { trendingViewData ->
|
||||
trendingViewData.asTagOrNull()?.tag?.history ?: emptyList()
|
||||
trendingViewData.asTagOrNull()?.tag?.history.orEmpty()
|
||||
}
|
||||
.mapNotNull { it.uses.toLongOrNull() }
|
||||
.maxOrNull() ?: 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue