Merged
Conversation
…ers, add deletion confirmation for custom scanners
There was a problem hiding this comment.
Pull request overview
This PR enhances the “custom scanner” workflow by introducing edit and delete capabilities, improving dialogs, and updating related strings so users can manage saved custom scanners more directly from the scanner browser UI.
Changes:
- Add edit + delete actions for saved custom scanners (including a deletion confirmation dialog).
- Extend dialogs to support “new vs edit” behavior and reuse deletion dialog with custom title/text.
- Update/extend localized string resources (EN/DE/IT) for the new UI.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Adds new strings for save/edit/delete and renames the custom-scanner dialog title key. |
| app/src/main/res/values-it/strings.xml | Italian translations for the new save/edit/delete strings and updated dialog title key. |
| app/src/main/res/values-de/strings.xml | German translations for the new save/edit/delete strings and updated dialog title key. |
| app/src/main/java/io/github/chrisimx/scanbridge/uicomponents/dialog/DeleteDialog.kt | Generalizes deletion dialog (custom title/body) and styles destructive actions in error color. |
| app/src/main/java/io/github/chrisimx/scanbridge/uicomponents/dialog/CustomScannerDialog.kt | Adds “new vs edit” mode with pre-filled fields and different button sets (connect vs save). |
| app/src/main/java/io/github/chrisimx/scanbridge/uicomponents/FoundScannerItem.kt | Adds edit + delete icon buttons for saved custom scanners and adjusts layout. |
| app/src/main/java/io/github/chrisimx/scanbridge/db/daos/CustomScannerDao.kt | Adds UUID-based fetch/delete DAO methods and enables REPLACE on insert for updates. |
| app/src/main/java/io/github/chrisimx/scanbridge/data/ui/CustomScannerViewModel.kt | Adds UUID-based delete and a UUID-based load helper. |
| app/src/main/java/io/github/chrisimx/scanbridge/data/model/EditedCustomScanner.kt | Introduces a sealed model to represent “new” vs “editing existing” custom scanners. |
| app/src/main/java/io/github/chrisimx/scanbridge/StartupScreen.kt | Switches dialog state from boolean to an EditedCustomScanner? to support edit/new modes. |
| app/src/main/java/io/github/chrisimx/scanbridge/ScanningScreen.kt | Updates deletion dialog call site to pass title/body resources. |
| app/src/main/java/io/github/chrisimx/scanbridge/ScannerBrowser.kt | Wires edit + delete flows into the scanner browser, including deletion confirmation and edit-save behavior. |
| app/src/androidTest/java/io/github/chrisimx/scanbridge/screenshot/ScanBridgeScreenshotTest.kt | Cleans up formatting/imports in screenshot tests. |
| app/src/androidTest/java/io/github/chrisimx/scanbridge/ScanBridgeTest.kt | Cleans up unused imports in android tests. |
| app/build.gradle.kts | Removes unused imports / whitespace cleanup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
app/src/main/java/io/github/chrisimx/scanbridge/uicomponents/dialog/DeleteDialog.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/io/github/chrisimx/scanbridge/uicomponents/FoundScannerItem.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/io/github/chrisimx/scanbridge/uicomponents/FoundScannerItem.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/io/github/chrisimx/scanbridge/db/daos/CustomScannerDao.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/io/github/chrisimx/scanbridge/data/ui/CustomScannerViewModel.kt
Outdated
Show resolved
Hide resolved
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.
No description provided.