Skip to content

Conversation

@Sandesh282
Copy link

Purpose / Description

When reviewing cards, if the current deck differs from the card’s deck, opening Deck Options currently takes the user directly to one deck without giving a choice. Desktop Anki allows the user to choose which deck’s options to open in this case.

This PR brings the Android reviewer behavior in line with desktop Anki by prompting the user to choose which deck’s options they want to open.
Due to AnkiDroid’s internal handling of the current deck during review, this choice is rarely triggered in normal usage, but the logic matches desktop Anki behavior and resolves the underlying ambiguity.

Fixes

Approach

The decision logic lives in the ReviewerViewModel. When the current deck and the card’s deck differ, the ViewModel emits a signal requesting user choice instead of navigating immediately.

The ReviewerFragment observes this signal and displays a simple dialog allowing the user to choose the target deck. Once selected, the final navigation to Deck Options is emitted by the ViewModel.

This keeps navigation logic centralized in the ViewModel and limits the Fragment to UI responsibilities.

How Has This Been Tested?

  • Manual testing on Android emulator and physical device
  • Verified code paths via logging in ReviewerViewModel

Note: The dialog only appears when the current study deck differs from the card’s deck. In AnkiDroid, the “current deck” is internally updated to the card’s deck during review, which makes this condition rare to trigger naturally. This matches internal behavior observed during debugging and is discussed in the linked issue.

The dialog behavior and navigation flow were verified by temporarily forcing the choice path during testing.

Test configuration:

  • Android Emulator (Pixel series)
  • Latest stable Android SDK

Learning (optional, can help others)

Reviewed how desktop Anki handles deck option selection when the reviewer’s current deck and the card’s deck differ, and mirrored that behavior while keeping Android architecture constraints in mind.

Checklist

  • 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

@welcome
Copy link

welcome bot commented Jan 16, 2026

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

@github-actions
Copy link
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@david-allison
Copy link
Member

Thanks so much! But this is already handled in #19963:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the user choose which deck's options to open in the reviewer

2 participants