Skip to content

[GSoC] migrated AnkiStatsTaskHandler.createReviewSummaryStatistics() to suspend function#11667

Merged
ShridharGoel merged 2 commits into
ankidroid:mainfrom
thedroiddiv:AsyncTask_To_Coroutines
Jun 22, 2022
Merged

[GSoC] migrated AnkiStatsTaskHandler.createReviewSummaryStatistics() to suspend function#11667
ShridharGoel merged 2 commits into
ankidroid:mainfrom
thedroiddiv:AsyncTask_To_Coroutines

Conversation

@thedroiddiv

Copy link
Copy Markdown
Member

This PR is a continuation of #11556

Purpose / Description

AsyncTask to coroutines migration

Fixes

Fixes a part of #7108

How Has This Been Tested?

Unit tested and runs as expected on Realme 6i API 30 and Pixel 3a Emulator API 31

Affected part is the bottom 1 line statistics

before
before

after
after

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration (SDK version(s), emulator or physical, etc)

Learning (optional, can help others)

Describe the research stage

Links to blog posts, patterns, libraries or addons used to solve this problem

Checklist

Please, go through these checks before submitting the PR.

  • You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • Your code follows the style of the project (e.g. never omit braces in if statements)
  • 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

Comment thread AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt Outdated
Comment thread AnkiDroid/src/main/java/com/ichi2/anki/stats/AnkiStatsTaskHandler.kt Outdated
@thedroiddiv thedroiddiv force-pushed the AsyncTask_To_Coroutines branch from 8610238 to 0e29502 Compare June 21, 2022 15:59
Comment thread AnkiDroid/src/main/java/com/ichi2/anki/stats/AnkiStatsTaskHandler.kt Outdated
@lukstbit lukstbit added Review High Priority Request for high priority review Needs Author Reply Waiting for a reply from the original author labels Jun 22, 2022
@lukstbit

Copy link
Copy Markdown
Member

After solving the raised issues, I'm ok with this PR being merged.

@thedroiddiv thedroiddiv force-pushed the AsyncTask_To_Coroutines branch from 0e29502 to 89c8054 Compare June 22, 2022 07:32
@ShridharGoel ShridharGoel changed the title [GSoC] migrated AnkiStatsTaskHandler.createReviewSummaryStatistics() to susdend function [GSoC] migrated AnkiStatsTaskHandler.createReviewSummaryStatistics() to suspend function Jun 22, 2022
@thedroiddiv

Copy link
Copy Markdown
Member Author

Once it gets merged, I can use the same ext function in #11628 and others as well.

@thedroiddiv

Copy link
Copy Markdown
Member Author

And also I thought of com.ichi2.async to be the more appropriate package for it. If there are any comments, let me know.

@ShridharGoel

Copy link
Copy Markdown
Member

Looks good.

@ShridharGoel ShridharGoel enabled auto-merge (rebase) June 22, 2022 09:09
@ShridharGoel ShridharGoel merged commit 85ea3e3 into ankidroid:main Jun 22, 2022
@github-actions github-actions Bot removed Review High Priority Request for high priority review Needs Author Reply Waiting for a reply from the original author labels Jun 22, 2022
@github-actions github-actions Bot added this to the 2.16 release milestone Jun 22, 2022
@thedroiddiv thedroiddiv deleted the AsyncTask_To_Coroutines branch June 22, 2022 09:39
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.

4 participants