aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-11-30 14:45:34 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-11-30 14:45:34 +0530
commit7475f2fb13f7f8b8e2bfbe48a58c2cca6b225392 (patch)
tree17e70d3313a8026a61d03b628482682155df2ea6 /app
parent14cc25af148e8506346644a1cf9a3dcc1b22b960 (diff)
fix: replace `Enum.values()` with `Enum.entries`
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/app/passwordstore/util/autofill/AutofillPreferences.kt2
-rw-r--r--app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/app/passwordstore/util/autofill/AutofillPreferences.kt b/app/src/main/java/app/passwordstore/util/autofill/AutofillPreferences.kt
index f1eb8835..b8490054 100644
--- a/app/src/main/java/app/passwordstore/util/autofill/AutofillPreferences.kt
+++ b/app/src/main/java/app/passwordstore/util/autofill/AutofillPreferences.kt
@@ -117,7 +117,7 @@ enum class DirectoryStructure(val value: String) {
val DEFAULT = FileBased
- private val reverseMap = values().associateBy { it.value }
+ private val reverseMap = entries.associateBy { it.value }
fun fromValue(value: String?) = if (value != null) reverseMap[value] ?: DEFAULT else DEFAULT
}
diff --git a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
index b72fc58b..1386bf97 100644
--- a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
+++ b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
@@ -140,7 +140,7 @@ object SshKey {
companion object {
- fun fromValue(value: String?): Type? = values().associateBy { it.value }[value]
+ fun fromValue(value: String?): Type? = entries.associateBy { it.value }[value]
}
}