Improve DeckSelectionDialog starting code and remove DeckSpinnerSelection#21075
Open
lukstbit wants to merge 3 commits into
Open
Improve DeckSelectionDialog starting code and remove DeckSpinnerSelection#21075lukstbit wants to merge 3 commits into
lukstbit wants to merge 3 commits into
Conversation
Contributor
|
Snapshot diff report vs
All 1 changed screenshotsPreferencesScreenshotTest
|
Member
Author
|
@BrayanDSO AboutFragment date value related screenshot testing failure. |
5 tasks
74688de to
6ecb1a5
Compare
Consolidates the code that was starting DeckSelectionDialog into just two methods for Activity/Fragment. The calling sites now don't have to manually get the decks they want to show. Note: DeckPickerWidgetConfig class was filtering the decks shown by DeckSelectionDialog to remove already selected decks. To simplify the new implementation this was disabled, but the current code in the activity handles this scenario. Will be reimplemented in the future, most likely in DeckSelectionDialog.
6ecb1a5 to
1d91557
Compare
Extra step in removing DeckSpinnerSelection
The single method from the file was inlined at the only place it was used. Some leftover todos were not really relevant anymore and were removed.
1d91557 to
6974613
Compare
david-allison
approved these changes
May 19, 2026
Comment on lines
+22
to
+25
| /** | ||
| * [DeckId] constant to represent "All decks" in screens that need it(ex. browser). | ||
| */ | ||
| const val ALL_DECKS_ID = 0L |
Member
There was a problem hiding this comment.
The package name is unusual
com.ichi2.anki.utils.ext.ALL_DECKS_ID
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.
Purpose / Description
Consolidates previous code used to fetch the decks presented in DeckSelectionDialog into two single methods for Activities/Fragments. Also removes DeckSpinnerSelection in the process.
Fixes
DeckSpinnerSelectionand recodeDeckSelectionDialog#18875How Has This Been Tested?
Ran tests, checked the code starting the dialog.
Checklist