Skip to content

refactor: extract applicationScope from AnkiDroidApp to :common:android#20926

Merged
david-allison merged 1 commit intoankidroid:mainfrom
criticalAY:refactor/common-appl-scope
May 3, 2026
Merged

refactor: extract applicationScope from AnkiDroidApp to :common:android#20926
david-allison merged 1 commit intoankidroid:mainfrom
criticalAY:refactor/common-appl-scope

Conversation

@criticalAY
Copy link
Copy Markdown
Contributor

Purpose / Description

Again one step forward to clean and organised code, extracting applicationScope from AnkiDroidApp

Fixes

Approach

See commit

How Has This Been Tested?

Local build and tests pass

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

// Main was accessed when the platform dispatcher was absent and the test dispatcher
// was unset
val applicationScope: CoroutineScope by lazy {
CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for the future (not related to this PR), maybe ProcessLifecycleOwner.get().lifecycleScope should be used for this goal

@BrayanDSO BrayanDSO added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels May 2, 2026
Copy link
Copy Markdown
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Solid, thanks!!

@david-allison david-allison added this pull request to the merge queue May 3, 2026
Merged via the queue into ankidroid:main with commit f51ea46 May 3, 2026
19 checks passed
@github-actions github-actions Bot removed the Needs Second Approval Has one approval, one more approval to merge label May 3, 2026
@github-actions github-actions Bot added this to the 2.24 release milestone May 3, 2026
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.

3 participants