Skip to content
This repository was archived by the owner on Jan 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,15 @@

*Describe the proposed solution and changes. How does it affect the project? How does it affect the internal structure (e.g., refactorings)?*

## 📷: Screenshots
## 📷 Screenshots

*Provide screenshots showcasing the changes before and after the proposed changes (if applicable).*

## 📋 : Release Notes
## 📚 Release Notes

*Provide a summary of the changes or features from a user's point of view. If there are breaking changes, provide migration guides using code examples of the affected features.*



## :heavy_plus_sign: Additional Information
*If applicable, provide additional context in this section.*

### Testing
## 📝 Testing

*Which tests were added? Which existing tests were adapted/changed? Which situations are covered, and what edge cases are missing?*

### Reviewer Nudging

*Where should the reviewer start? what is a good entry point?*
7 changes: 6 additions & 1 deletion app/src/main/kotlin/cloud/keyspace/android/AddLogin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ class AddLogin : AppCompatActivity() {
}
}

if (secretInput.text.toString().isNotBlank() && secretInput.text.toString().length < 6) {
secretInput.error = "Please enter a valid TOTP secret"
return@setOnClickListener
}

saveItem()

}
Expand Down Expand Up @@ -629,7 +634,7 @@ class AddLogin : AppCompatActivity() {
override fun afterTextChanged (s: Editable) { }
override fun beforeTextChanged (s: CharSequence, start: Int, count: Int, after: Int) { }
override fun onTextChanged (s: CharSequence, start: Int, before: Int, count: Int) {
if (s.length >= 8) {
if (s.length >= 6) {
try {
otpCode = GoogleAuthenticator(base32secret = secretInput.text.toString()).generate()
runOnUiThread { tokenPreview.text = otpCode!!.replace("...".toRegex(), "$0 ") }
Expand Down