Skip to content

Instantly share code, notes, and snippets.

View simplekjl's full-sized avatar
🎯
Focusing

Jose Luis Crisostomo simplekjl

🎯
Focusing
  • Berlin, Germany
  • 08:12 (UTC +02:00)
View GitHub Profile
/**
* @return [LiveData] with value produced from combining [source1] and [source2] using [combiner]
*
* This function produces new value only if [source1] and [source2] values are not null
*/
fun <T1, T2, R> combineNonNull(
source1: LiveData<T1>,
source2: LiveData<T2>,
combiner: (T1, T2) -> R