Skip to content
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic committed Feb 9, 2015
1 parent 3567b88 commit 0410aa9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ConfirmAddContactDialog extends EnsiChatActivity with OnMessageReceivedLis
.setCancelable(false)
.setPositiveButton(android.R.string.yes, this)
.setNegativeButton(android.R.string.no, this)
.setCancelable(false)
.show()
}

Expand All @@ -74,6 +75,7 @@ class ConfirmAddContactDialog extends EnsiChatActivity with OnMessageReceivedLis
addContactIfBothConfirmed()
true
case DialogInterface.BUTTON_NEGATIVE =>
finish()
false
}
service.sendTo(user.Address, new ResultAddContact(result))
Expand All @@ -85,7 +87,7 @@ class ConfirmAddContactDialog extends EnsiChatActivity with OnMessageReceivedLis
private def addContactIfBothConfirmed(): Unit = {
if (localConfirmed && remoteConfirmed) {
Log.i(Tag, "Adding new contact " + user.toString)
// Get the user again, in case
// Get the user again, in case it was updated in the mean time.
service.database.addContact(service.getUser(user.Address))
Toast.makeText(this, getString(R.string.contact_added, user.Name), Toast.LENGTH_SHORT)
.show()
Expand Down

0 comments on commit 0410aa9

Please sign in to comment.