diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-04-27 16:43:02 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-04-27 16:43:02 +0200 |
commit | 29616d02a8e97a9044daec286bdfa7c862108fa4 (patch) | |
tree | 92a0f408fc8e7ee2ba9a35139bd9e967b65ee553 /src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java | |
parent | ebcb13c8ebdb9f0e1de8ea2c9b4c491f1d8ae308 (diff) |
removed unused config variables
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java b/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java index a6b3c73c7..89000a685 100644 --- a/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java +++ b/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java @@ -43,17 +43,14 @@ public class EnterJidDialog { final String title, final String positiveButton, final String prefilledJid, final String account, boolean allowEditJid ) { - final boolean lock = Config.LOCK_DOMAINS_IN_CONVERSATIONS && Config.DOMAIN_LOCK != null; AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(title); View dialogView = LayoutInflater.from(context).inflate(R.layout.enter_jid_dialog, null); final TextView jabberIdDesc = (TextView) dialogView.findViewById(R.id.jabber_id); - jabberIdDesc.setText(lock ? R.string.username : R.string.account_settings_jabber_id); + jabberIdDesc.setText(R.string.account_settings_jabber_id); final Spinner spinner = (Spinner) dialogView.findViewById(R.id.account); final AutoCompleteTextView jid = (AutoCompleteTextView) dialogView.findViewById(R.id.jid); - if (!lock) { - jid.setAdapter(new KnownHostsAdapter(context, android.R.layout.simple_list_item_1, knownHosts)); - } + jid.setAdapter(new KnownHostsAdapter(context, android.R.layout.simple_list_item_1, knownHosts)); if (prefilledJid != null) { jid.append(prefilledJid); if (!allowEditJid) { @@ -64,7 +61,7 @@ public class EnterJidDialog { } } - jid.setHint(Config.LOCK_DOMAINS_IN_CONVERSATIONS && Config.DOMAIN_LOCK != null ? R.string.username_hint : R.string.account_settings_example_jabber_id); + jid.setHint(R.string.account_settings_example_jabber_id); if (account == null) { StartConversationActivity.populateAccountSpinner(context, activatedAccounts, spinner); @@ -100,13 +97,9 @@ public class EnterJidDialog { } final Jid contactJid; try { - if (lock) { - contactJid = Jid.fromParts(jid.getText().toString(), Config.DOMAIN_LOCK, null); - } else { - contactJid = Jid.fromString(jid.getText().toString()); - } + contactJid = Jid.fromString(jid.getText().toString()); } catch (final InvalidJidException e) { - jid.setError(context.getString(lock ? R.string.invalid_username : R.string.invalid_jid)); + jid.setError(context.getString(R.string.invalid_jid)); return; } |