Fix LiveDataTestUtil

This commit is contained in:
andrew 2023-06-30 12:32:56 +09:30
parent f68c01b2ee
commit 19b2c5ef97
1 changed files with 1 additions and 1 deletions

View File

@ -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)