simplify AddFavoritesDialog confirmation
This commit is contained in:
parent
3cddd70a5b
commit
aef045f160
1 changed files with 1 additions and 5 deletions
|
@ -43,13 +43,10 @@ class AddFavoritesDialog(val activity: SimpleActivity, private val callback: ()
|
|||
}
|
||||
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this)
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
dialogConfirmed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +63,6 @@ class AddFavoritesDialog(val activity: SimpleActivity, private val callback: ()
|
|||
contactsHelper.removeFavorites(allDisplayedContacts)
|
||||
|
||||
callback()
|
||||
dialog?.dismiss()
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue