forked from upstream-mirrors/quik
Show custom/random colours in compose screen
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.moez.QKSMS.extensions
|
||||
|
||||
inline fun <K, T> Iterable<T>.associateByNotNull(keySelector: (T) -> K?): Map<K, T> {
|
||||
val map = hashMapOf<K, T>()
|
||||
forEach { value ->
|
||||
val key = keySelector(value)
|
||||
if (key != null) {
|
||||
map[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
return map
|
||||
}
|
||||
Reference in New Issue
Block a user