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

feature/#21 - automatically storing keywords and group results into the database #71

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

monsieurtanuki
Copy link
Contributor

... and automagically asking the end-user if they want to see the cache

New files:

  • dao_product.dart
  • dao_product_list.dart
  • database_product_list_supplier.dart
  • product_list.dart
  • product_list_supplier.dart
  • product_query_page_helper.dart
  • query_product_list_supplier.dart

Impacted files:

  • choose_page.dart: now uses ProductQueryPageHelper in order to get database or http results; refactored
  • continuous_scan_model.dart: minor refactoring due to DAO
  • group_product_query.dart: now implements new method getProductList
  • keywords_product_query.dart: now implements new method getProductList
  • local_database.dart: now it's version 2; refactored using the new DAO classes
  • product_query.dart: new method getProductList
  • product_query_model.dart: now we use a ProductListSupplier instead of a ProductQuery
  • product_query_page.dart: now we use a ProductListSupplier instead of a ProductQuery

As mentioned, for the moment I've only implemented the list for keywords and group searches:
Simulator Screen Shot - iPhone 8 Plus - 2021-01-10 at 16 38 51

…he database

... and automagically asking the end-user if they want to see the cache

New files:
* `dao_product.dart`
* `dao_product_list.dart`
* `database_product_list_supplier.dart`
* `product_list.dart`
* `product_list_supplier.dart`
* `product_query_page_helper.dart`
* `query_product_list_supplier.dart`

Impacted files:
* `choose_page.dart`: now uses `ProductQueryPageHelper` in order to get database or http results; refactored
* `continuous_scan_model.dart`: minor refactoring due to DAO
* `group_product_query.dart`: now implements new method `getProductList`
* `keywords_product_query.dart`: now implements new method `getProductList`
* `local_database.dart`: now it's version 2; refactored using the new DAO classes
* `product_query.dart`: new method `getProductList`
* `product_query_model.dart`: now we use a `ProductListSupplier` instead of a `ProductQuery`
* `product_query_page.dart`: now we use a `ProductListSupplier` instead of a `ProductQuery`
Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

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

Is a good feature, well thought out. I have nothing to complain about 👍

@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev!
In a next PR I'll use the database for the scan feature: a scan history list, and a possible database lookup for the scanned barcode.

@monsieurtanuki monsieurtanuki merged commit 2bfb738 into openfoodfacts:master Jan 11, 2021
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.

2 participants