-
-
Couldn't load subscription status.
- Fork 2.5k
feat: select an arbitrary deck when sharing an image to Image Occlusion #19259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a01b663 to
4adb120
Compare
AnkiDroid/src/main/java/com/ichi2/anki/pages/viewmodel/ImageOcclusionViewModel.kt
Show resolved
Hide resolved
4ac8af2 to
fa28bdb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
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
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.