don’t show edit nick on Conversations

This commit is contained in:
Daniel Gultsch 2018-11-10 10:19:29 +01:00
parent e335c59600
commit ccf9c42d0d
3 changed files with 14 additions and 5 deletions

View file

@ -61,6 +61,7 @@ import eu.siacs.conversations.ui.util.MenuDoubleTabUtil;
import eu.siacs.conversations.ui.util.PendingItem;
import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.Resolver;
import eu.siacs.conversations.utils.SignupUtils;
import eu.siacs.conversations.utils.UIHelper;
import eu.siacs.conversations.utils.XmppUri;
@ -544,7 +545,7 @@ 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);
@ -556,6 +557,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
if (Config.DISALLOW_REGISTRATION_IN_UI) {
this.binding.accountRegisterNew.setVisibility(View.GONE);
}
this.binding.yourNameBox.setVisibility(QuickConversationsService.isQuicksy() ? View.VISIBLE : View.GONE);
this.binding.actionEditYourName.setOnClickListener(this::onEditYourNameClicked);
}

View file

@ -37,6 +37,8 @@ import eu.siacs.conversations.services.XmppConnectionService;
public class Resolver {
public static final int DEFAULT_PORT_XMPP = 5222;
private static final String DIRECT_TLS_SERVICE = "_xmpps-client";
private static final String STARTTLS_SERICE = "_xmpp-client";
@ -148,7 +150,7 @@ public class Resolver {
try {
Result result = new Result();
result.ip = InetAddress.getByName(domain);
result.port = 5222;
result.port = DEFAULT_PORT_XMPP;
return Collections.singletonList(result);
} catch (UnknownHostException e) {
return Collections.emptyList();
@ -268,7 +270,7 @@ public class Resolver {
public static final String AUTHENTICATED = "authenticated";
private InetAddress ip;
private DNSName hostname;
private int port = 5222;
private int port = DEFAULT_PORT_XMPP;
private boolean directTls = false;
private boolean authenticated = false;
private int priority;
@ -284,7 +286,7 @@ public class Resolver {
static Result createDefault(DNSName hostname, InetAddress ip) {
Result result = new Result();
result.port = 5222;
result.port = DEFAULT_PORT_XMPP;
result.hostname = hostname;
result.ip = ip;
return result;

View file

@ -469,11 +469,16 @@
</TableRow>
</TableLayout>
<View
android:layout_width="match_parent"
android:layout_height="8dp"/>
<RelativeLayout
android:id="@+id/your_name_box"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="32dp">
android:visibility="gone"
android:layout_marginTop="24dp">
<LinearLayout
android:layout_width="wrap_content"