Add https:// in manual login's url
This commit is contained in:
parent
d6c270c81c
commit
04e76170e9
|
@ -1,5 +1,6 @@
|
||||||
package org.unifiedpush.distributor.nextpush.activities
|
package org.unifiedpush.distributor.nextpush.activities
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
@ -23,6 +24,7 @@ import org.unifiedpush.distributor.nextpush.utils.TAG
|
||||||
class StartActivity : AppCompatActivity() {
|
class StartActivity : AppCompatActivity() {
|
||||||
private var onResult: ((activity: Activity, requestCode: Int, resultCode: Int, data: Intent?, block: (success: Boolean) -> Unit) -> Unit)? = null
|
private var onResult: ((activity: Activity, requestCode: Int, resultCode: Int, data: Intent?, block: (success: Boolean) -> Unit) -> Unit)? = null
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_start)
|
setContentView(R.layout.activity_start)
|
||||||
|
@ -35,6 +37,7 @@ class StartActivity : AppCompatActivity() {
|
||||||
setTypeSSO()
|
setTypeSSO()
|
||||||
login()
|
login()
|
||||||
}
|
}
|
||||||
|
findViewById<EditText>(R.id.edt_url).setText("https://")
|
||||||
findViewById<Button>(R.id.btn_manual_login).setOnClickListener {
|
findViewById<Button>(R.id.btn_manual_login).setOnClickListener {
|
||||||
val url = findViewById<EditText>(R.id.edt_url).text.toString().let {
|
val url = findViewById<EditText>(R.id.edt_url).text.toString().let {
|
||||||
if (it.last() != '/') {
|
if (it.last() != '/') {
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
android:hint="@string/login_hint_nextcloud_root_url"
|
android:hint="@string/login_hint_nextcloud_root_url"
|
||||||
android:inputType="textUri"
|
android:inputType="textUri"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="false"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:theme="@style/TextInputEditTextLogin" />
|
android:theme="@style/TextInputEditTextLogin" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue