Commit 751642b3 authored by Viktor De Pasquale's avatar Viktor De Pasquale Committed by John Wu

Fixed back button not working on flash screen

parent d6c2c821
......@@ -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])
......
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