diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/model/PasswordEntry.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/model/PasswordEntry.kt b/app/src/main/java/com/zeapo/pwdstore/model/PasswordEntry.kt index a143fcb9..5727c4ba 100644 --- a/app/src/main/java/com/zeapo/pwdstore/model/PasswordEntry.kt +++ b/app/src/main/java/com/zeapo/pwdstore/model/PasswordEntry.kt @@ -60,9 +60,11 @@ class PasswordEntry(content: String, private val totpFinder: TotpFinder = UriTot } val extraContentWithoutAuthData by lazy(LazyThreadSafetyMode.NONE) { + var foundUsername = false extraContent.splitToSequence("\n").filter { line -> return@filter when { - USERNAME_FIELDS.any { prefix -> line.startsWith(prefix, ignoreCase = true) } -> { + USERNAME_FIELDS.any { prefix -> line.startsWith(prefix, ignoreCase = true) } && !foundUsername -> { + foundUsername = true false } line.startsWith("otpauth://", ignoreCase = true) || |