# HG changeset patch # User Da Risk # Date 1245868070 -7200 # Node ID ffffa9b4428c8f5cd9d51368fed73e7ceac76d6e # Parent f882aa78e0f92986f2cc84bad7f80931069fb244 Some fixes diff -r f882aa78e0f9 -r ffffa9b4428c src/com/beem/project/beem/service/Contact.java --- a/src/com/beem/project/beem/service/Contact.java Wed Jun 24 20:02:07 2009 +0200 +++ b/src/com/beem/project/beem/service/Contact.java Wed Jun 24 20:27:50 2009 +0200 @@ -307,8 +307,11 @@ */ public Uri toUri() { StringBuilder build = new StringBuilder("xmpp:"); - build.append(StringUtils.parseName(mJID)).append('@').append( - StringUtils.parseServer(mJID)); + String name = StringUtils.parseName(mJID); + build.append(name); + if (! "".equals(name)) + build.append('@'); + build.append(StringUtils.parseServer(mJID)); Uri u = Uri.parse(build.toString()); return u; } diff -r f882aa78e0f9 -r ffffa9b4428c src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Wed Jun 24 20:02:07 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Wed Jun 24 20:27:50 2009 +0200 @@ -130,6 +130,8 @@ if (mContactName == null || "".equals(mContactName)) { mContactName = mContact.getJID(); mContactName = StringUtils.parseName(mContactName); + if ("".equals(mContactName)) + mContactName = mContact.getJID(); } mLogin.setText(mContactName); } @@ -243,8 +245,6 @@ protected void onStart() { super.onStart(); // TODO cancel the notification if any - if (mContact == null) - mContact = getIntent().getParcelableExtra("contact"); try { if (mRoster != null) mContact = mRoster.getContact(mContact.getJID());