mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-05 15:40:08 +02:00
Fix issue #430 - Store instance
This commit is contained in:
parent
f71a73abc8
commit
0c27c839d3
1 changed files with 3 additions and 2 deletions
|
@ -238,15 +238,16 @@ public class FragmentLoginMain extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrievesClientId(String instance) {
|
private void retrievesClientId(String instance) {
|
||||||
|
String oldInstance = instance;
|
||||||
if (!instance.startsWith("http://") && !instance.startsWith("https://")) {
|
if (!instance.startsWith("http://") && !instance.startsWith("https://")) {
|
||||||
instance = "https://" + instance;
|
instance = "https://" + instance;
|
||||||
}
|
}
|
||||||
String host = instance;
|
String host;
|
||||||
try {
|
try {
|
||||||
URL url = new URL(instance);
|
URL url = new URL(instance);
|
||||||
host = url.getHost();
|
host = url.getHost();
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
host = instance;
|
host = oldInstance;
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue