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

refactor: backgroundTasks - around the new "upload" method #3028

Merged

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • abstract_background_task.dart: refactored around the upload method
  • background_task_details.dart: now implements the new upload method
  • background_task_image.dart: now implements the new upload method
  • product_refresher.dart: removed now useless method saveAndRefresh

What

  • Refactored while trying to understand - in the end, the background tasks differ only by the upload part (the rest is just the same)
  • It's not just refactoring for refactoring; the idea is to make the code easier to upgrade (as we'll have to do it).

Part of

Impacted files:
* `abstract_background_task.dart`: refactored around the `upload` method
* `background_task_details.dart`: now implements the new `upload` method
* `background_task_image.dart`: now implements the new `upload` method
* `product_refresher.dart`: removed now useless method `saveAndRefresh`
Copy link
Member

@AshAman999 AshAman999 left a comment

Choose a reason for hiding this comment

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

Everything looks good to me ,
Looks more readable now !!!

@codecov-commenter
Copy link

Codecov Report

Merging #3028 (936def0) into develop (f893237) will increase coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           develop   #3028      +/-   ##
==========================================
+ Coverage     6.52%   6.54%   +0.02%     
==========================================
  Files          244     244              
  Lines        12075   12036      -39     
==========================================
  Hits           788     788              
+ Misses       11287   11248      -39     
Impacted Files Coverage Δ
...h_app/lib/background/abstract_background_task.dart 0.00% <0.00%> (ø)
...th_app/lib/background/background_task_details.dart 1.96% <0.00%> (+0.34%) ⬆️
...ooth_app/lib/background/background_task_image.dart 0.00% <0.00%> (ø)
...pp/lib/pages/product/common/product_refresher.dart 2.63% <ø> (+1.22%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@monsieurtanuki monsieurtanuki merged commit 2ca03cd into openfoodfacts:develop Sep 17, 2022
@monsieurtanuki
Copy link
Contributor Author

Thank you @AshAman999 for your review!

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

Successfully merging this pull request may close these issues.

3 participants