mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
Fixed event duplication
This commit is contained in:
parent
38019f7f42
commit
d8338f0b48
@ -4,7 +4,6 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.CallSuper
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import androidx.fragment.app.Fragment
|
||||
@ -39,7 +38,6 @@ abstract class BaseFragment<ViewModel : BaseViewModel, Binding : ViewDataBinding
|
||||
return binding.root
|
||||
}
|
||||
|
||||
@CallSuper
|
||||
override fun onEventDispatched(event: ViewEvent) {
|
||||
super.onEventDispatched(event)
|
||||
activity.onEventDispatched(event)
|
||||
|
@ -43,8 +43,6 @@ abstract class CompatActivity<ViewModel : CompatViewModel, Binding : ViewDataBin
|
||||
}
|
||||
|
||||
override fun onEventDispatched(event: ViewEvent) {
|
||||
super.onEventDispatched(event)
|
||||
|
||||
delegate.onEventExecute(event, this)
|
||||
}
|
||||
|
||||
@ -54,7 +52,7 @@ abstract class CompatActivity<ViewModel : CompatViewModel, Binding : ViewDataBin
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("The event is self handled.")
|
||||
@Deprecated("The event is self handled.", level = DeprecationLevel.ERROR)
|
||||
override fun navigateTo(event: MagiskNavigationEvent) = Unit
|
||||
|
||||
protected fun ViewEvent.dispatchOnSelf() = onEventDispatched(this)
|
||||
|
@ -29,8 +29,6 @@ abstract class CompatFragment<ViewModel : CompatViewModel, Binding : ViewDataBin
|
||||
}
|
||||
|
||||
override fun onEventDispatched(event: ViewEvent) {
|
||||
super.onEventDispatched(event)
|
||||
|
||||
delegate.onEventExecute(event, this)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user