Commit 04d37254 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix hostnames being added allowing uppercase

parent 0d37954e
...@@ -41,7 +41,7 @@ public class RocketChatCache { ...@@ -41,7 +41,7 @@ public class RocketChatCache {
} }
public void setSelectedServerHostname(String hostname) { public void setSelectedServerHostname(String hostname) {
setString(KEY_SELECTED_SERVER_HOSTNAME, hostname); setString(KEY_SELECTED_SERVER_HOSTNAME, hostname.toLowerCase());
} }
public void addHostname(@NonNull String hostname, @Nullable String hostnameAvatarUri) { public void addHostname(@NonNull String hostname, @Nullable String hostnameAvatarUri) {
......
...@@ -290,7 +290,6 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract ...@@ -290,7 +290,6 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
FrescoHelper.INSTANCE.loadImage(serverButton, serverLogoUrl, placeholder); FrescoHelper.INSTANCE.loadImage(serverButton, serverLogoUrl, placeholder);
serverListContainer.addView(serverRow, serverCount - 1); serverListContainer.addView(serverRow, serverCount - 1);
serverListContainer.requestLayout();
} }
} }
} }
......
...@@ -72,7 +72,7 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost ...@@ -72,7 +72,7 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
private String getHostname() { private String getHostname() {
final TextView editor = (TextView) rootView.findViewById(R.id.editor_hostname); final TextView editor = (TextView) rootView.findViewById(R.id.editor_hostname);
return TextUtils.or(TextUtils.or(editor.getText(), editor.getHint()), "").toString(); return TextUtils.or(TextUtils.or(editor.getText(), editor.getHint()), "").toString().toLowerCase();
} }
private void showError(String errString) { private void showError(String errString) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment