From 317eb00fa358217578938d6e3bc2efbf48cf92ba Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 27 Jun 2020 22:18:27 +0530 Subject: [PATCH 1/3] GitOperation: Ensure we call the correct setError method Without this we'd have overlapping password toggle and error drawable icons. This issue was triggered because of Kotlin converting `setError` to its property syntax. That caused things to be delegated to platform `TextView`'s `setError(String)` method as opposed to `TextInputEditText`'s `setError(String, Drawable)`. Signed-off-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 8cf09b394b..33a08fa445 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(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) From ec3535b1381ab3a0f1b3632b8e85d3ff5483cb24 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 27 Jun 2020 22:29:22 +0530 Subject: [PATCH 2/3] Fix overlapping labels for very long site names This would previously get laid under the child count and folder indicator icon. Now it will eagerly split into separate lines as soon as it reaches the child count view Signed-off-by: Harsh Shandilya --- app/src/main/res/layout/password_row_layout.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 30d9c40fa5..93da710e46 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -26,12 +26,13 @@ From e7a3a27b86ccba9ecfdd05a7060b04af0773f12f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 28 Jun 2020 01:12:12 +0530 Subject: [PATCH 3/3] update changelog Signed-off-by: Harsh Shandilya --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77b7def15b..08544acb90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ All notable changes to this project will be documented in this file. ### Fixed - Remember passphrase option did not work with keys that had empty passphrases and were generated before 2019 +- Folder names that were very long did not look right +- Error message for wrong SSH/HTTPS password now looks cleaner ### Added