Fix LiveDataTestUtil
This commit is contained in:
parent
f68c01b2ee
commit
19b2c5ef97
|
@ -22,7 +22,7 @@ fun <T> LiveData<T>.getOrAwaitValue(
|
|||
var data: T? = null
|
||||
val latch = CountDownLatch(1)
|
||||
val observer = object : Observer<T> {
|
||||
override fun onChanged(o: T?) {
|
||||
override fun onChanged(o: T) {
|
||||
data = o
|
||||
latch.countDown()
|
||||
this@getOrAwaitValue.removeObserver(this)
|
||||
|
|
Loading…
Reference in New Issue