Replace IntArray#indexOfFirst((Int) -> Boolean) with IntArray#indexOf(Int)

pull/510/head
veyndan 6 years ago
parent 65af1cc99b
commit f0aba8d455

@ -10,7 +10,7 @@ object PaletteUtils {
@JvmStatic @JvmStatic
fun colorToPaletteIndex(context: Context, color: Int): Int { fun colorToPaletteIndex(context: Context, color: Int): Int {
val palette = StyledResources(context).palette val palette = StyledResources(context).palette
return palette.indexOfFirst { i -> palette[i] == color } return palette.indexOf(color)
} }
@JvmStatic @JvmStatic

Loading…
Cancel
Save