-
-
Notifications
You must be signed in to change notification settings - Fork 280
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: 5586 - added explicit product type to all relevant background tasks #5721
Merged
monsieurtanuki
merged 4 commits into
openfoodfacts:develop
from
monsieurtanuki:feat/5586_3
Oct 25, 2024
Merged
feat: 5586 - added explicit product type to all relevant background tasks #5721
monsieurtanuki
merged 4 commits into
openfoodfacts:develop
from
monsieurtanuki:feat/5586_3
Oct 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…asks New file: * `work_type.dart`: Type of long download work for some background tasks. Impacted files: * `background_task.dart`: removed the default `uriProductHelper` getter * `background_task_barcode.dart`: added a `uriProductHelper` getter that depends on the `productType` * `background_task_download_products.dart`: refactored the access to product type * `background_task_full_refresh.dart`: split by product type * `background_task_language_refresh.dart`: split by product type * `background_task_offline.dart`: refactored the access to product type * `background_task_progressing.dart`: added the `productType` parameter; moved code to new `WorkType` class * `background_task_top_barcodes.dart`: refactored the access to product type * `dao_product.dart`: new methods `getProductTypes` and `splitAllProducts`; refactored with product type * `lazy_counter.dart`: explicitly counting the "food" products * `newsfeed_provider.dart`: explicitly getting the news from "food" * `offline_data_page.dart`: now displaying "download top N products" buttons for each product type; stats for each product type * `offline_tasks_page.dart`: enhanced "work text" algo, now depending on product type * `operation_type.dart`: enhanced "key" algo, now depending on product type * `ordered_nutrients_cache.dart`: explicitly using the "food" nutrients * `product_list_page.dart`: now reloading products from their server * `product_list_popup_items.dart`: now linking to the first server with products * `product_query.dart`: made product type a mandatory parameter * `product_refresher.dart`: added mandatory parameter product type * `random_questions_query.dart`: explicitly ask for "food" robotoff products * `temp_product_list_share_helper.dart`: added mandatory parameter product type * `user_preferences_dev_debug_info.dart`: added explicit use of "food" data
teolemon
approved these changes
Oct 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @monsieurtanuki
little conflict @monsieurtanuki |
Thank you @teolemon for your reviews! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Screenshot
Fixes bug(s)
Files
New file:
work_type.dart
: Type of long download work for some background tasks.Impacted files:
background_task.dart
: removed the defaulturiProductHelper
getterbackground_task_barcode.dart
: added auriProductHelper
getter that depends on theproductType
background_task_download_products.dart
: refactored the access to product typebackground_task_full_refresh.dart
: split by product typebackground_task_language_refresh.dart
: split by product typebackground_task_offline.dart
: refactored the access to product typebackground_task_progressing.dart
: added theproductType
parameter; moved code to newWorkType
classbackground_task_top_barcodes.dart
: refactored the access to product typedao_product.dart
: new methodsgetProductTypes
andsplitAllProducts
; refactored with product typelazy_counter.dart
: explicitly counting the "food" productsnewsfeed_provider.dart
: explicitly getting the news from "food"offline_data_page.dart
: now displaying "download top N products" buttons for each product type; stats for each product typeoffline_tasks_page.dart
: enhanced "work text" algo, now depending on product typeoperation_type.dart
: enhanced "key" algo, now depending on product typeordered_nutrients_cache.dart
: explicitly using the "food" nutrientsproduct_list_page.dart
: now reloading products from their serverproduct_list_popup_items.dart
: now linking to the first server with productsproduct_query.dart
: made product type a mandatory parameterproduct_refresher.dart
: added mandatory parameter product typerandom_questions_query.dart
: explicitly ask for "food" robotoff productstemp_product_list_share_helper.dart
: added mandatory parameter product typeuser_preferences_dev_debug_info.dart
: added explicit use of "food" data