Fix issue #430 - Store instance

This commit is contained in:
Thomas 2022-11-11 10:50:03 +01:00
parent f71a73abc8
commit 0c27c839d3
1 changed files with 3 additions and 2 deletions

View File

@ -238,15 +238,16 @@ public class FragmentLoginMain extends Fragment {
}
private void retrievesClientId(String instance) {
String oldInstance = instance;
if (!instance.startsWith("http://") && !instance.startsWith("https://")) {
instance = "https://" + instance;
}
String host = instance;
String host;
try {
URL url = new URL(instance);
host = url.getHost();
} catch (MalformedURLException e) {
host = instance;
host = oldInstance;
e.printStackTrace();
}