mirror of https://github.com/x13a/Wasted.git
ref
This commit is contained in:
parent
0f1a47ff79
commit
5f31be5eba
|
@ -133,7 +133,14 @@ open class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
toggle.setOnLongClickListener {
|
||||
if (!toggle.isChecked) return@setOnLongClickListener false
|
||||
MaterialAlertDialogBuilder(this@MainActivity)
|
||||
showPanicDialog()
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showPanicDialog() {
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.dialog_confirm_panic_title)
|
||||
.setMessage(R.string.dialog_confirm_panic_message)
|
||||
.setPositiveButton(R.string.yes) { _, _ ->
|
||||
|
@ -144,9 +151,6 @@ open class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show()
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showLaunchersSettings() {
|
||||
|
|
Loading…
Reference in New Issue