From 21b4f2476c8879e7711571a5f1b9bfd0c56fda51 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 23 Nov 2018 14:00:56 +0100 Subject: move default port to Resolver.java --- .../java/de/pixart/messenger/ui/EditAccountActivity.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/main/java/de/pixart/messenger/ui/EditAccountActivity.java') diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index 2f004a165..113d0ed23 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -67,6 +67,7 @@ import de.pixart.messenger.ui.util.SoftKeyboardUtils; import de.pixart.messenger.utils.CryptoHelper; import de.pixart.messenger.utils.MenuDoubleTabUtil; import de.pixart.messenger.utils.Namespace; +import de.pixart.messenger.utils.Resolver; import de.pixart.messenger.utils.SignupUtils; import de.pixart.messenger.utils.UIHelper; import de.pixart.messenger.utils.XmppUri; @@ -563,20 +564,17 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat this.binding.hostname.addTextChangedListener(mTextWatcher); this.binding.hostname.setOnFocusChangeListener(mEditTextFocusListener); this.binding.clearDevices.setOnClickListener(v -> showWipePepDialog()); - this.binding.port.setText("5222"); + this.binding.port.setText(String.valueOf(Resolver.DEFAULT_PORT_XMPP)); this.binding.port.addTextChangedListener(mTextWatcher); this.binding.saveButton.setOnClickListener(this.mSaveButtonClickListener); this.binding.cancelButton.setOnClickListener(this.mCancelButtonClickListener); if (savedInstanceState != null && savedInstanceState.getBoolean("showMoreTable")) { changeMoreTableVisibility(true); } - final OnCheckedChangeListener OnCheckedShowConfirmPassword = new OnCheckedChangeListener() { - @Override - public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) { - updatePortLayout(); - updateSaveButton(); - updateInfoButtons(); - } + final OnCheckedChangeListener OnCheckedShowConfirmPassword = (buttonView, isChecked) -> { + updatePortLayout(); + updateSaveButton(); + updateInfoButtons(); }; this.binding.accountRegisterNew.setOnCheckedChangeListener(OnCheckedShowConfirmPassword); if (Config.DISALLOW_REGISTRATION_IN_UI) { -- cgit v1.2.3