mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-12-18 08:32:24 +03:00
#21 not sure if I need to type in http/https – it should work without any protocol prepended, and try with https by default
This commit is contained in:
parent
581e301635
commit
990d8f682c
1 changed files with 7 additions and 1 deletions
|
@ -59,6 +59,9 @@ public class SettingsActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
String url = ((EditText) findViewById(R.id.settings_url)).getText().toString();
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
||||
url = "https://" + url;
|
||||
}
|
||||
new URLValidatorAsyncTask().execute(url);
|
||||
|
||||
if (NotesClientUtil.isHttp(url)) {
|
||||
|
@ -88,7 +91,10 @@ public class SettingsActivity extends AppCompatActivity {
|
|||
if (!url.endsWith("/")) {
|
||||
url += "/";
|
||||
}
|
||||
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
||||
url = "https://" + url;
|
||||
}
|
||||
Log.v("Note", "URL: " + url);
|
||||
new LoginValidatorAsyncTask().execute(url, username, password);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue