Add check for duplicates upon saving entry#1652
Merged
alexbakker merged 1 commit intobeemdevelopment:masterfrom May 29, 2025
Merged
Add check for duplicates upon saving entry#1652alexbakker merged 1 commit intobeemdevelopment:masterfrom
alexbakker merged 1 commit intobeemdevelopment:masterfrom
Conversation
2f66a12 to
d86dbe7
Compare
alexbakker
requested changes
May 29, 2025
| return true; | ||
| } | ||
|
|
||
| private void showDuplicateBottomSheet(VaultEntry newEntry) |
Member
There was a problem hiding this comment.
Style nit: The { belongs on the same line.
| newEntry.getName() | ||
| ); | ||
|
|
||
| new AlertDialog.Builder(this) |
Member
There was a problem hiding this comment.
This should be a MaterialAlertDialogBuilder.
| newName = baseName + " #" + counter++; | ||
| } while (existingNames.contains(newName)); | ||
|
|
||
| if (suffixSubtext != null) { |
app/src/main/res/values/strings.xml
Outdated
| <string name="note" comment="Users can add a note to an entry">Note</string> | ||
| <string name="clear">Clear</string> | ||
|
|
||
| <string name="dialog_duplicate_entry_title">Duplicate Entry</string> |
Member
There was a problem hiding this comment.
Do we want "Entry" in upper or lower case? I think we usually do lower case throughout the app.
app/src/main/res/values/strings.xml
Outdated
| <item quantity="other">Are you sure you want to delete %d entries with the following name:\n\n%s - %s</item> | ||
| </plurals> | ||
|
|
||
| <string name="dialog_duplicate_entry_overwrite_dialog_title">Confirm Deletion</string> |
d86dbe7 to
1335be6
Compare
alexbakker
approved these changes
May 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new BottomSheetDialog in the EditEntryActivity notifying the user that a similar entry (based on name + issuer) already exists. We will prompt the user with a couple options on how to proceed. I purposely left out the "Save anyway" option because I don't see the need for it, but let me know if you'd like to see otherwise.
Closes #1606