From b0297fb6c5750a97b4990821b6b908777ab6be7d Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 31 Aug 2021 20:51:46 +0200 Subject: [PATCH] Twice --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 9cc01c98cc..be3944222f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -930,10 +930,9 @@ public class FragmentAccount extends FragmentBase { boolean pro = ActivityBilling.isPro(context); boolean should = args.getBoolean("should"); - if (host.contains(":")) { - Uri h = Uri.parse(host); - host = h.getHost(); - } + int semi = host.indexOf(':'); + if (semi > 0 && host.indexOf(':', semi + 1) < 0) + host = host.substring(0, semi); if (TextUtils.isEmpty(host) && !should) throw new IllegalArgumentException(context.getString(R.string.title_no_host));