Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-static locale #21549

Merged
merged 5 commits into from
Dec 20, 2024
Merged

Non-static locale #21549

merged 5 commits into from
Dec 20, 2024

Conversation

nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Dec 20, 2024

This PR addresses this comment regarding LocaleManager by removing LocaleManager.getLanguage() and replacing it with PerAppLocaleManager.getCurrentLocaleLanguageCode().

@ParaskP7 I've asked for your review of this since you're familiar with the context, but there's no rush to get this merged. Also, I see that this is failing SonarCloud Code Analysis due to duplication, but I'm thinking we can ignore that 🤞

@dangermattic
Copy link
Collaborator

dangermattic commented Dec 20, 2024

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 20, 2024

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
Versionpr21549-3e407f7
Commit3e407f7
Direct Downloadwordpress-prototype-build-pr21549-3e407f7.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 20, 2024

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
Versionpr21549-3e407f7
Commit3e407f7
Direct Downloadjetpack-prototype-build-pr21549-3e407f7.apk
Note: Google Login is not supported on these builds.

import org.wordpress.android.util.UrlUtils;

import static org.wordpress.android.ui.reader.utils.ReaderUtils.getTagForSearchQuery;

public class ReaderSearchLogic {
private final ServiceCompletionListener mCompletionListener;

private final LocaleManagerWrapper mLocaleManagerWrapper;
private final PerAppLocaleManager mPerAppLocaleManager;

Check notice

Code scanning / Android Lint

Nullable/NonNull annotation missing on field Note

Missing null annotation
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.0% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube Cloud

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 26.66667% with 11 lines in your changes missing coverage. Please review.

Project coverage is 39.48%. Comparing base (01f6aca) to head (3e407f7).
Report is 6 commits behind head on trunk.

Files with missing lines Patch % Lines
...d/ui/reader/services/search/ReaderSearchLogic.java 0.00% 3 Missing ⚠️
...droid/ui/reader/repository/ReaderPostRepository.kt 0.00% 2 Missing ⚠️
...ui/reader/services/discover/ReaderDiscoverLogic.kt 0.00% 2 Missing ⚠️
...s/android/push/NotificationsProcessingService.java 0.00% 1 Missing ⚠️
...reader/services/search/ReaderSearchJobService.java 0.00% 1 Missing ⚠️
...ui/reader/services/search/ReaderSearchService.java 0.00% 1 Missing ⚠️
...d/ui/reader/services/update/ReaderUpdateLogic.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #21549   +/-   ##
=======================================
  Coverage   39.48%   39.48%           
=======================================
  Files        2117     2117           
  Lines       99464    99464           
  Branches    15296    15296           
=======================================
  Hits        39269    39269           
  Misses      56714    56714           
  Partials     3481     3481           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nbradbury nbradbury marked this pull request as ready for review December 20, 2024 18:38
@nbradbury nbradbury requested a review from ParaskP7 December 20, 2024 18:39
Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

👋 @nbradbury !

I have reviewed this PR as per the instructions (also tested it), everything works as expected, thanks for making this refactor! 🥇

Also, I see that this is failing SonarCloud Code Analysis due to duplication, but I'm thinking we can ignore that 🤞

Definitely can ignore that. 👍

@nbradbury
Copy link
Contributor Author

@ParaskP7 You surprised me by reviewing this so quickly - thank you!

@nbradbury nbradbury merged commit 194cad2 into trunk Dec 20, 2024
23 of 24 checks passed
@nbradbury nbradbury deleted the nick/non-static-locale branch December 20, 2024 22:03
@ParaskP7
Copy link
Contributor

😅 I would have been now or 2 weeks from now! 😅

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.

4 participants