Merge "Fix Kotlin warning (min -> minOrNull)"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2c38bd5390
@@ -28,7 +28,7 @@ class PrivacyChipBuilder(private val context: Context, itemsList: List<PrivacyIt
|
||||
appsAndTypes = itemsList.groupBy({ it.application }, { it.privacyType })
|
||||
.toList()
|
||||
.sortedWith(compareBy({ -it.second.size }, // Sort by number of AppOps
|
||||
{ it.second.min() })) // Sort by "smallest" AppOpp (Location is largest)
|
||||
{ it.second.minOrNull() })) // Sort by "smallest" AppOpp (Location is largest)
|
||||
types = itemsList.map { it.privacyType }.distinct().sorted()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user