Skip to content

fix(study-screen): streamline actions#20055

Open
BrayanDSO wants to merge 2 commits intoankidroid:mainfrom
BrayanDSO:ref/everything-in-one-place
Open

fix(study-screen): streamline actions#20055
BrayanDSO wants to merge 2 commits intoankidroid:mainfrom
BrayanDSO:ref/everything-in-one-place

Conversation

@BrayanDSO
Copy link
Member

@BrayanDSO BrayanDSO commented Jan 8, 2026

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

@BrayanDSO BrayanDSO added Needs Review Blocked by dependency Currently blocked by some other dependent / related change labels Jan 8, 2026
@BrayanDSO BrayanDSO force-pushed the ref/everything-in-one-place branch from 6b51e4f to 6f5893a Compare January 9, 2026 00:15
@BrayanDSO BrayanDSO force-pushed the ref/everything-in-one-place branch from 6f5893a to 657b6cb Compare February 5, 2026 19:06
@BrayanDSO BrayanDSO removed Blocked by dependency Currently blocked by some other dependent / related change Has Conflicts labels Feb 5, 2026
@BrayanDSO BrayanDSO marked this pull request as draft February 6, 2026 09:02
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
@BrayanDSO BrayanDSO force-pushed the ref/everything-in-one-place branch from 657b6cb to 7d04854 Compare February 6, 2026 09:06
@BrayanDSO BrayanDSO marked this pull request as ready for review February 6, 2026 09:08
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.

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

1 participant

Comments