summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-06-28 01:45:39 +0530
committerGitHub <noreply@github.com>2020-06-28 01:45:39 +0530
commit9fc5d337b8dfecb2821225f006b1bf616d678159 (patch)
treeaf0884d4a5b8f90fba7ba74ed68a72c345f7719f /app/src/main/java
parent0a0e5174146ce367ba9118b80438adaef36bf40c (diff)
UI fixups (#892)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt
index 8cf09b39..33a08fa4 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt
@@ -9,6 +9,7 @@ import android.app.Activity
import android.content.Intent
import android.view.LayoutInflater
import androidx.annotation.StringRes
+import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.preference.PreferenceManager
import com.google.android.material.checkbox.MaterialCheckBox
@@ -35,6 +36,7 @@ import org.eclipse.jgit.transport.URIish
import java.io.File
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
+import com.google.android.material.R as materialR
private class GitOperationCredentialFinder(val callingActivity: Activity, val connectionMode: ConnectionMode) : InteractivePasswordFinder() {
@@ -77,7 +79,8 @@ private class GitOperationCredentialFinder(val callingActivity: Activity, val co
val rememberCredential = dialogView.findViewById<MaterialCheckBox>(R.id.git_auth_remember_credential)
rememberCredential.setText(rememberRes)
if (isRetry)
- editCredential.error = callingActivity.resources.getString(errorRes)
+ editCredential.setError(callingActivity.resources.getString(errorRes),
+ ContextCompat.getDrawable(callingActivity, materialR.drawable.mtrl_ic_error))
MaterialAlertDialogBuilder(callingActivity).run {
setTitle(R.string.passphrase_dialog_title)
setMessage(messageRes)