feat: select an arbitrary deck when sharing an image to Image Occlusion#19259
Merged
BrayanDSO merged 1 commit intoankidroid:mainfrom Oct 24, 2025
Merged
feat: select an arbitrary deck when sharing an image to Image Occlusion#19259BrayanDSO merged 1 commit intoankidroid:mainfrom
BrayanDSO merged 1 commit intoankidroid:mainfrom
Conversation
a01b663 to
4adb120
Compare
lukstbit
requested changes
Sep 22, 2025
AnkiDroid/src/main/java/com/ichi2/anki/pages/viewmodel/ImageOcclusionViewModel.kt
Show resolved
Hide resolved
4ac8af2 to
fa28bdb
Compare
lukstbit
reviewed
Sep 25, 2025
Member
There was a problem hiding this comment.
If we are moving to selecting the deck in this screen then we should hide the deck selection in the NoteEditorFragment when the notetype is image occlusion.
This can be done with two simple calls in NoteEditorFragment.setNote():
requireView().findViewById<TextView>(R.id.CardEditorDeckText).isVisible = !currentNotetypeIsImageOcclusion()
requireView().findViewById<View>(R.id.note_deck_spinner).isVisible = !currentNotetypeIsImageOcclusion()
Would be helpful for #16083
AnkiDroid/src/main/java/com/ichi2/anki/pages/viewmodel/ImageOcclusionViewModel.kt
Show resolved
Hide resolved
fa28bdb to
8b87700
Compare
BrayanDSO
requested changes
Oct 9, 2025
AnkiDroid/src/main/java/com/ichi2/anki/pages/viewmodel/ImageOcclusionViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/pages/viewmodel/ImageOcclusionViewModel.kt
Outdated
Show resolved
Hide resolved
8b87700 to
64763d6
Compare
64763d6 to
98108de
Compare
4 tasks
BrayanDSO
approved these changes
Oct 24, 2025
5 tasks
4 tasks
4 tasks
This was referenced Nov 8, 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.
Purpose / Description
Allow the user to change deck while in IO screen anki also allows the user to change the decks i.e. where the note is being saved but in collection it stays unchanged
Fixes
Approach
Used a viewmodel to save old deck id and allow the user to change deck from the spinner at the top and then later revert back to original deck once the note is saved
How Has This Been Tested?
Google Pixel 9 API 31
Screen_recording_20250922_015908.webm
Learning (optional, can help others)
NA
Checklist
Please, go through these checks before submitting the PR.