Show name+addr when asking to start a new chat.

This commit is contained in:
B. Petersen
2016-11-12 14:05:09 +01:00
parent 6f1d364d1d
commit d1d38b64e2
3 changed files with 20 additions and 9 deletions
@@ -3765,7 +3765,14 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
long hContact = MrMailbox.MrMailboxGetContactById(MrMailbox.hMailbox, fromId);
if( hContact==0 ) { MrMailbox.MrMsgUnref(hMsg); return; }
String name = MrMailbox.MrContactGetDisplayName(hContact);
String name = MrMailbox.MrContactGetName(hContact);
if( name.isEmpty() ) {
name = MrMailbox.MrContactGetAddr(hContact);
}
else {
name += " (" + MrMailbox.MrContactGetAddr(hContact) + ")";
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new DialogInterface.OnClickListener() {