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

[Tags IA] Fetch posts for multiple tags #20684

Closed thomashorta closed 2 weeks ago

thomashorta commented 3 weeks ago

Fixes #20588

Move shared fetching logic to Repository and create ViewModel to use Repository to fetch posts for tags directly.


To Test:


Regression Notes

  1. Potential unintended areas of impact

    • Fetching posts in other places of the Reader
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manual tests
    • Unit tests of Repository
    • Unit tests of existing code
  3. What automated tests I added (or what prevented me from doing so)

    • Unit tests in all new classes introduced

PR Submission Checklist:


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

N/A, the UI in this PR is completely throwaway and only there to easily test these changes.

dangermattic commented 3 weeks ago
1 Warning
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

wpmobilebot commented 3 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
Versionpr20684-59ba75c
Commit59ba75c6f3ace25198d20d2c7c56d33c8edb2e37
Direct Downloadwordpress-prototype-build-pr20684-59ba75c.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 3 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
Versionpr20684-59ba75c
Commit59ba75c6f3ace25198d20d2c7c56d33c8edb2e37
Direct Downloadjetpack-prototype-build-pr20684-59ba75c.apk
Note: Google Login is not supported on these builds.
codecov[bot] commented 3 weeks ago

Codecov Report

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

Project coverage is 40.39%. Comparing base (5e50e18) to head (59ba75c). Report is 486 commits behind head on feature/tags-ia.

Files Patch % Lines
...droid/ui/reader/repository/ReaderPostRepository.kt 3.15% 92 Missing :warning:
...ndroid/datasets/wrappers/ReaderPostTableWrapper.kt 0.00% 8 Missing :warning:
...droid/ui/reader/services/post/ReaderPostLogic.java 40.00% 3 Missing :warning:
...android/ui/reader/sources/ReaderPostLocalSource.kt 93.02% 0 Missing and 3 partials :warning:
.../org/wordpress/android/ui/prefs/AppPrefsWrapper.kt 0.00% 2 Missing :warning:
...d/ui/reader/exceptions/ReaderPostFetchException.kt 50.00% 1 Missing :warning:
.../ui/reader/services/post/ReaderPostJobService.java 0.00% 1 Missing :warning:
...oid/ui/reader/services/post/ReaderPostService.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## feature/tags-ia #20684 +/- ## =================================================== + Coverage 40.33% 40.39% +0.06% =================================================== Files 1474 1479 +5 Lines 67878 67950 +72 Branches 11225 11232 +7 =================================================== + Hits 27377 27451 +74 + Misses 38034 38024 -10 - Partials 2467 2475 +8 ```

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

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

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

See analysis details on SonarCloud