mirror of https://github.com/M66B/FairEmail.git
Allow entering IPv6 address
This commit is contained in:
parent
dd5c1d0ba3
commit
318d5df2b2
|
@ -679,10 +679,9 @@ public class FragmentAccount extends FragmentBase {
|
||||||
String realm = args.getString("realm");
|
String realm = args.getString("realm");
|
||||||
String fingerprint = args.getString("fingerprint");
|
String fingerprint = args.getString("fingerprint");
|
||||||
|
|
||||||
if (host.contains(":")) {
|
int semi = host.indexOf(':');
|
||||||
Uri h = Uri.parse(host);
|
if (semi > 0 && host.indexOf(':', semi + 1) < 0)
|
||||||
host = h.getHost();
|
host = host.substring(0, semi);
|
||||||
}
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(host))
|
if (TextUtils.isEmpty(host))
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
||||||
|
|
|
@ -744,10 +744,9 @@ public class FragmentIdentity extends FragmentBase {
|
||||||
|
|
||||||
boolean should = args.getBoolean("should");
|
boolean should = args.getBoolean("should");
|
||||||
|
|
||||||
if (host.contains(":")) {
|
int semi = host.indexOf(':');
|
||||||
Uri h = Uri.parse(host);
|
if (semi > 0 && host.indexOf(':', semi + 1) < 0)
|
||||||
host = h.getHost();
|
host = host.substring(0, semi);
|
||||||
}
|
|
||||||
|
|
||||||
//if (TextUtils.isEmpty(name) && !should)
|
//if (TextUtils.isEmpty(name) && !should)
|
||||||
// throw new IllegalArgumentException(context.getString(R.string.title_no_name));
|
// throw new IllegalArgumentException(context.getString(R.string.title_no_name));
|
||||||
|
|
|
@ -374,10 +374,9 @@ public class FragmentPop extends FragmentBase {
|
||||||
boolean pro = ActivityBilling.isPro(context);
|
boolean pro = ActivityBilling.isPro(context);
|
||||||
boolean should = args.getBoolean("should");
|
boolean should = args.getBoolean("should");
|
||||||
|
|
||||||
if (host.contains(":")) {
|
int semi = host.indexOf(':');
|
||||||
Uri h = Uri.parse(host);
|
if (semi > 0 && host.indexOf(':', semi + 1) < 0)
|
||||||
host = h.getHost();
|
host = host.substring(0, semi);
|
||||||
}
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(host) && !should)
|
if (TextUtils.isEmpty(host) && !should)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
||||||
|
|
Loading…
Reference in New Issue