diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index a42e3a8c0..0c2d1bb1d 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -406,18 +406,12 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp binding.detailsSendPresence.setOnCheckedChangeListener(null); binding.detailsReceivePresence.setOnCheckedChangeListener(null); - final AlertDialog.Builder deleteFromRosterDialog = new AlertDialog.Builder(ContactDetailsActivity.this); - binding.addContactButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View view) { - deleteFromRosterDialog.setNegativeButton(getString(R.string.cancel), null); - deleteFromRosterDialog.setTitle(getString(R.string.action_delete_contact)) - .setMessage( - getString(R.string.remove_contact_text, - contact.getJid().toString())) - .setPositiveButton(getString(R.string.delete), - removeFromRoster).create().show(); - } + binding.addContactButton.setOnClickListener(view -> { + final AlertDialog.Builder deleteFromRosterDialog = new AlertDialog.Builder(ContactDetailsActivity.this); + deleteFromRosterDialog.setNegativeButton(getString(R.string.cancel), null); + deleteFromRosterDialog.setTitle(getString(R.string.action_delete_contact)); + deleteFromRosterDialog.setMessage(getString(R.string.remove_contact_text, contact.getJid().toString())); + deleteFromRosterDialog.setPositiveButton(getString(R.string.delete), removeFromRoster).create().show(); }); binding.detailsSendPresence.setOnCheckedChangeListener(null); binding.detailsReceivePresence.setOnCheckedChangeListener(null); |