Fixed leaking base instance to the event listener
This commit is contained in:
parent
36e4ccd800
commit
147264822c
@ -7,10 +7,6 @@ import timber.log.Timber
|
|||||||
|
|
||||||
abstract class MagiskViewModel : LoadingViewModel(), Event.AutoListener {
|
abstract class MagiskViewModel : LoadingViewModel(), Event.AutoListener {
|
||||||
|
|
||||||
init {
|
|
||||||
Event.register(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onEvent(event: Int) = Timber.i("Event of $event was not handled")
|
override fun onEvent(event: Int) = Timber.i("Event of $event was not handled")
|
||||||
override fun getListeningEvents(): IntArray = intArrayOf()
|
override fun getListeningEvents(): IntArray = intArrayOf()
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ class HomeViewModel(
|
|||||||
private val latest = resources.getString(R.string.latest_version)
|
private val latest = resources.getString(R.string.latest_version)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Event.register(this)
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user