Skip to content

Conversation

@BrayanDSO
Copy link
Member

Purpose / Description

Doing everything asynchronously and in parallel lead to some concurrency issues, like #19641

Fixes

Approach

use executeAction as the single source of actions from the fragment

that way, most uses of launchCatchingIO got removed, so actions won't run parallelly

then use a mutex to make actions run in order inside executeAction

As executeAction is supposed to be used only by the View, not in the ViewModel internal logic, it being "synchronic" is alright, I think

How Has This Been Tested?

Emulator 31 + an auto clicker

Screen_recording_20260108_154243.mp4

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

removed some tests in ReviewerKeyboardInputTest as fixing them isn't worth it given that the old study screen will be eventually removed
instead of the ViewerCommand Enum, which will be eventually removed
instead of the ViewerCommand Enum, which will be eventually removed
which is more correct and matches Anki Desktop

to avoid disrupting the users' workflow because of their previous "show answer" functionality, the bindings are correctly copied to "Show answer" if set to the question side
should be squashed with the last commit.

Split to ease the reviewing process
unnecessary after `Answer` gestures got restricted to the answer side
@BrayanDSO BrayanDSO added Needs Review Blocked by dependency Currently blocked by some other dependent / related change labels Jan 8, 2026
use `executeAction` as the single point of actions from the fragment

that way, most uses of launchCatchingIO got removed, so actions won't run parallelly

then use a mutex to make actions run in order inside `executeAction`

fixes 19641
removes a call of launchCatchingIO
@BrayanDSO BrayanDSO force-pushed the ref/everything-in-one-place branch from 6b51e4f to 6f5893a Compare January 9, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked by dependency Currently blocked by some other dependent / related change Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New study screen] Card was modified error when tapping the answer buttons quickly

1 participant