Merge pull request #296 from cyb3rko/message-delete-confirmation
Confirmation dialog to delete all messages
This commit is contained in:
@@ -521,9 +521,16 @@ internal class MessagesActivity :
|
|||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
if (item.itemId == R.id.action_delete_all) {
|
if (item.itemId == R.id.action_delete_all) {
|
||||||
launchCoroutine {
|
MaterialAlertDialogBuilder(this)
|
||||||
deleteMessages(viewModel.appId)
|
.setTitle(R.string.delete_all)
|
||||||
}
|
.setMessage(R.string.ack)
|
||||||
|
.setPositiveButton(R.string.yes) { _, _ ->
|
||||||
|
launchCoroutine {
|
||||||
|
deleteMessages(viewModel.appId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.setNegativeButton(R.string.no, null)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
if (item.itemId == R.id.action_delete_app) {
|
if (item.itemId == R.id.action_delete_app) {
|
||||||
MaterialAlertDialogBuilder(this)
|
MaterialAlertDialogBuilder(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user