Commit f152b4c2 authored by topjohnwu's avatar topjohnwu

Make LiveData nullable

parent bd935b05
...@@ -177,7 +177,7 @@ abstract class BaseDownloader : BaseService(), KoinComponent { ...@@ -177,7 +177,7 @@ abstract class BaseDownloader : BaseService(), KoinComponent {
companion object : KoinComponent { companion object : KoinComponent {
const val ACTION_KEY = "download_action" const val ACTION_KEY = "download_action"
private val progressBroadcast = MutableLiveData<Pair<Float, Subject>>() private val progressBroadcast = MutableLiveData<Pair<Float, Subject>?>()
fun observeProgress(owner: LifecycleOwner, callback: (Float, Subject) -> Unit) { fun observeProgress(owner: LifecycleOwner, callback: (Float, Subject) -> Unit) {
progressBroadcast.value = null progressBroadcast.value = null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment