Add https:// in manual login's url

This commit is contained in:
S1m 2024-01-16 20:48:21 +01:00
parent d6c270c81c
commit 04e76170e9
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package org.unifiedpush.distributor.nextpush.activities
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
@ -23,6 +24,7 @@ import org.unifiedpush.distributor.nextpush.utils.TAG
class StartActivity : AppCompatActivity() {
private var onResult: ((activity: Activity, requestCode: Int, resultCode: Int, data: Intent?, block: (success: Boolean) -> Unit) -> Unit)? = null
@SuppressLint("SetTextI18n")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_start)
@ -35,6 +37,7 @@ class StartActivity : AppCompatActivity() {
setTypeSSO()
login()
}
findViewById<EditText>(R.id.edt_url).setText("https://")
findViewById<Button>(R.id.btn_manual_login).setOnClickListener {
val url = findViewById<EditText>(R.id.edt_url).text.toString().let {
if (it.last() != '/') {

View File

@ -109,7 +109,7 @@
android:hint="@string/login_hint_nextcloud_root_url"
android:inputType="textUri"
android:maxLines="1"
android:selectAllOnFocus="true"
android:selectAllOnFocus="false"
android:singleLine="true"
android:theme="@style/TextInputEditTextLogin" />