Skip to content

Conversation

@criticalAY
Copy link
Contributor

@criticalAY criticalAY commented Sep 21, 2025

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.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Member

@lukstbit lukstbit left a 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

Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Sep 26, 2025
@BrayanDSO BrayanDSO added the Needs Author Reply Waiting for a reply from the original author label Oct 9, 2025
@criticalAY criticalAY force-pushed the feat/io-deck-change branch from 8b87700 to 64763d6 Compare October 9, 2025 18:10
@criticalAY criticalAY removed the Needs Author Reply Waiting for a reply from the original author label Oct 9, 2025
@criticalAY criticalAY requested a review from BrayanDSO October 9, 2025 18:10
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Oct 24, 2025
@BrayanDSO BrayanDSO added this pull request to the merge queue Oct 24, 2025
Merged via the queue into ankidroid:main with commit 4447314 Oct 24, 2025
10 checks passed
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Oct 24, 2025
@github-actions github-actions bot added this to the 2.23 release milestone Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't change decks when adding image occlusion Can't select an arbitrary deck when sharing an image to Image Occlusion

3 participants