From 8a467e33dd7212fc3926b6fed2ae64fcb57e7f60 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Tue, 23 Dec 2014 17:12:52 -0500 Subject: [PATCH 1/2] Don't show menu on create account screen --- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 07e06b75e..e9c11d88f 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -329,11 +329,14 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate getMenuInflater().inflate(R.menu.editaccount, menu); final MenuItem showQrCode = menu.findItem(R.id.action_show_qr_code); final MenuItem showBlocklist = menu.findItem(R.id.action_show_block_list); + final MenuItem showMoreInfo = menu.findItem(R.id.action_server_info_show_more); if (mAccount == null) { showQrCode.setVisible(false); showBlocklist.setVisible(false); + showMoreInfo.setVisible(false); } else if (mAccount.getStatus() != Account.State.ONLINE || !mAccount.getXmppConnection().getFeatures().blocking()) { showBlocklist.setVisible(false); + showMoreInfo.setVisible(false); } return true; } From afbe727b17b1e1d1a994b003f28ab7562bb655b4 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Tue, 23 Dec 2014 17:35:36 -0500 Subject: [PATCH 2/2] Don't allow user to register domain only jids --- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index e9c11d88f..9597b15e5 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -82,6 +82,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate mAccountJid.requestFocus(); return; } + if (jid.isDomainJid()) { + mAccountJid.setError(getString(R.string.invalid_jid)); + mAccountJid.requestFocus(); + return; + } final String password = mPassword.getText().toString(); final String passwordConfirm = mPasswordConfirm.getText().toString(); if (registerNewAccount) {