wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.92k stars 1.3k forks source link

Prevents ANR when fetching reader post #20642

Closed antonis closed 4 weeks ago

antonis commented 4 weeks ago

Fixes #20641

Description

This PR prevents an ANR when fetching post by moving the DB operation to the background


To Test:

I was not able to reproduce this ANR thus I'd recommend a sanity of the functionality:

  1. In the MySite screen select More>Comments
  2. Tap on a comment
  3. Verify that it load correctly and the like status loads correctly

Regression Notes

  1. Potential unintended areas of impact

    • Reader post comment
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manual testing
  3. What automated tests I added (or what prevented me from doing so)

    • The specific code is hard to test without major refactoring

PR Submission Checklist:


Testing Checklist (strike-out the not-applying and unnecessary ones):

sonarcloud[bot] commented 4 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

wpmobilebot commented 4 weeks ago
WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20642-50b239d
Commit50b239d9375d35d1d3c8904d3e43ae6ec2d4ca2c
Direct Downloadwordpress-prototype-build-pr20642-50b239d.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 4 weeks ago
Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20642-50b239d
Commit50b239d9375d35d1d3c8904d3e43ae6ec2d4ca2c
Direct Downloadjetpack-prototype-build-pr20642-50b239d.apk
Note: Google Login is not supported on these builds.
codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 40.46%. Comparing base (2f077fa) to head (50b239d).

Files Patch % Lines
...s/android/ui/reader/actions/ReaderPostActions.java 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #20642 +/- ## ========================================== - Coverage 40.46% 40.46% -0.01% ========================================== Files 1484 1484 Lines 68413 68415 +2 Branches 11307 11307 ========================================== Hits 27683 27683 - Misses 38230 38232 +2 Partials 2500 2500 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sentry-io[bot] commented 3 weeks ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎