Fixed back button not working on flash screen
This commit is contained in:
parent
d6c2c821a4
commit
751642b39a
@ -11,6 +11,8 @@ import com.topjohnwu.magisk.Const
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.base.BaseActivity
|
||||
import com.topjohnwu.magisk.databinding.ActivityFlashBinding
|
||||
import com.topjohnwu.magisk.model.events.BackPressEvent
|
||||
import com.topjohnwu.magisk.model.events.ViewEvent
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
import org.koin.core.parameter.parametersOf
|
||||
import java.io.File
|
||||
@ -37,6 +39,13 @@ open class FlashActivity : BaseActivity<FlashViewModel, ActivityFlashBinding>()
|
||||
super.onBackPressed()
|
||||
}
|
||||
|
||||
override fun onEventDispatched(event: ViewEvent) {
|
||||
super.onEventDispatched(event)
|
||||
when (event) {
|
||||
is BackPressEvent -> onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
private fun intent(context: Context) = Intent(context, ClassMap[FlashActivity::class.java])
|
||||
|
Loading…
Reference in New Issue
Block a user