Inform when the login fails

This commit is contained in:
sim 2023-03-19 17:44:15 +01:00
parent a5b6275e56
commit 8450a24a91
2 changed files with 6 additions and 1 deletions

View File

@ -91,7 +91,9 @@ class DirectAccountFactory : AccountFactory {
}
private fun retActivity(activity: Activity) {
(activity as StartActivity).onActivityResult(0, 0, null)
activity.runOnUiThread {
(activity as StartActivity).onActivityResult(0, 0, null)
}
}
inner class DirectAuth(private val username: String, private val password: String) : Authenticator {

View File

@ -11,6 +11,7 @@ import android.widget.EditText
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isGone
import com.google.android.material.textfield.TextInputEditText
@ -74,6 +75,8 @@ class StartActivity : AppCompatActivity() {
if (success) {
goToMainActivity(this)
finish()
} else {
Toast.makeText(applicationContext, "Could not connect to UnifiedPush provider", Toast.LENGTH_SHORT).show()
}
}
}