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

feat: 5099 - new dev mode item to refresh all the products from the server #5100

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • New item in dev mode: "Refresh all products from server (cf. Nutriscore v2)".
  • With a click, we refresh all the local product database from the server using background tasks.
  • Here we reuse the "change the app language" mechanism just after resetting all the local product languages.

Screenshot

Screenshot_1709317576

Fixes bug(s)

Impacted files

  • dao_product.dart: new method clearAllLanguages
  • pubspec.lock: wtf
  • user_preferences_dev_mode.dart: added a "Refresh all products from server (cf. Nutriscore v2)" item

…erver

Impacted files:
* `dao_product.dart`: new method `clearAllLanguages`
* `pubspec.lock`: wtf
* `user_preferences_dev_mode.dart`: added a "Refresh all products from server (cf. Nutriscore v2)" item
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner March 1, 2024 18:33
@monsieurtanuki monsieurtanuki requested a review from teolemon March 1, 2024 18:34
@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2024

Codecov Report

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

Project coverage is 9.52%. Comparing base (4d9c7fc) to head (850a0b1).
Report is 53 commits behind head on develop.

Files Patch % Lines
...b/pages/preferences/user_preferences_dev_mode.dart 0.00% 7 Missing ⚠️
packages/smooth_app/lib/database/dao_product.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5100      +/-   ##
==========================================
- Coverage     9.54%   9.52%   -0.02%     
==========================================
  Files          325     327       +2     
  Lines        16411   16538     +127     
==========================================
+ Hits          1567    1576       +9     
- Misses       14844   14962     +118     

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

@monsieurtanuki monsieurtanuki merged commit c6077dc into openfoodfacts:develop Apr 8, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Update of all the local products from the server
3 participants