18 Commits

Author SHA1 Message Date
e3bc40fdf3 chore: Migration to Dart 3.8 (#6668)
* Migration to Dart 3.8

* New GA

* Fix dartdoc
2025-06-23 18:14:17 +02:00
d5e3032d18 Don't force the product type with custom URLs (#6309) 2025-02-03 17:25:54 +01:00
fd9633c05a Force cookie to be saved if not (#5254) 2024-05-17 08:57:18 +02:00
d744fab334 fix: 5217 - no check on cookie as it's always null (#5222) 2024-05-06 09:20:41 +02:00
321eb9ebe3 The user's cookie is now stored and passed to the API (#5170) 2024-04-20 15:20:30 +02:00
7a81c0c69f feat: 5014 - track all READ server queries when consented (#5057)
* feat: 5014 - track all READ server queries when consented

Impacted files:
* `analytics_helper.dart`: added a public static `isEnabled` method
* `background_task.dart`: now explicitly using the WRITE user
* `background_task_download_products.dart`: now explicitly using the READ user
* `background_task_top_barcodes.dart`: now explicitly using the READ user
* `brand_suggestion_manager.dart`: now explicitly using the READ user
* `ocr_helper.dart`: now explicitly using the READ user
* `paged_product_query.dart`: now explicitly using the READ user
* `product_list_page.dart`: now explicitly using the READ user
* `product_query.dart`: split the user into READ and WRITE users
* `product_refresher.dart`: now explicitly using the READ user
* `random_questions_query.dart`: now explicitly using the READ user
* `simple_input_text_field.dart`: now explicitly using the READ user
* `user_management_provider.dart`: now explicitly using the WRITE user
* `user_preferences_account.dart`: now explicitly using the WRITE user

* minor refactoring

* merge conflicts desperate fix
2024-02-13 20:24:26 +01:00
a6faac096c fix: 4766 - when logging in, show adequate error messages (#4783)
* fix: 4766 - when logging in, show adequate error messages.

New file:
* `login_result.dart`: Result of a log in attempt, more subtle than a `bool`.

Impacted files:
* `app_en.arb`: added 2 labels (network unreachable and server KO)
* `app_fr.arb`: added 2 labels (network unreachable and server KO)
* `background_task_manager.dart`: minor refactoring
* `login_page.dart`: refactored using new class `LoginResult` in order to display more adequate error messages.
* `pubspec.lock`: wtf
* `smooth_app_data_importer.dart`: minor refactoring
* `user_management_provider.dart`: refactored using new class `LoginResult`

* Update packages/smooth_app/lib/pages/user_management/login_page.dart

* Update packages/smooth_app/lib/pages/user_management/login_page.dart

* Update packages/smooth_app/lib/pages/user_management/login_page.dart

* Delete packages/smooth_app/lib/helpers/data_importer/smooth_app_data_importer.dart

no more data_importer
2023-11-17 12:59:21 +01:00
2b49c87daf chore: upgrade to off-dart 3.0.0 (#4686)
Impacted files:
* `background_task.dart`: minor refactoring
* `background_task_crop.dart`: added the `UriProductHelper` parameter
* `background_task_details.dart`: added the `UriProductHelper` parameter
* `background_task_download_products.dart`: added the `UriProductHelper` parameter
* `background_task_image.dart`: added the `UriProductHelper` parameter
* `background_task_top_barcodes.dart`: added the `UriProductHelper` parameter
* `background_task_unselect.dart`: added the `UriProductHelper` parameter
* `forgot_password_page.dart`: added the `UriProductHelper` parameter
* `ocr_ingredients_helper.dart`: added the `UriProductHelper` parameter
* `ocr_packaging_helper.dart`: added the `UriProductHelper` parameter
* `onboarding_data_product.dart`: added the `UriProductHelper` parameter
* `ordered_nutrients_cache.dart`: added the `UriProductHelper` parameter
* `paged_product_query.dart`: added the `UriProductHelper` parameter
* `product_cards_helper.dart`: now using an off-dart method
* `product_image_server_button.dart`: added the `UriProductHelper` parameter
* `product_list_import_export.dart`: added the `UriProductHelper` parameter
* `product_list_page.dart`: added the `UriProductHelper` parameter
* `product_query.dart`: added a static `UriProductHelper` that more or less replaces the `QueryType`; minor refactoring
* `product_refresher.dart`: added the `UriProductHelper` parameter
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded off-dart to 3.0.0
* `random_questions_query.dart`: `countries` instead of `country`
* `sign_up_page.dart`: added the `UriProductHelper` parameter
* `temp_product_list_share_helper.dart`: now using a `UriProductHelper`
* `user_management_provider.dart`: added the `UriProductHelper` parameter
* `user_preferences_account.dart`: added the `UriProductHelper` parameter
* `user_preferences_dev_debug_info.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
2023-10-04 07:37:29 +02:00
b60ce32537 fix: Save userId insted of user email (#3499) 2023-01-02 20:05:18 +01:00
7e861f569e refactor: upgrade to off-dart 2.0.0 (#3495)
Impacted files:
* `paged_to_be_completed_product_query.dart`: renamed `State` as `ProductState`
* `paged_user_product_query.dart`: created local `UserSearchType` instead of deprecated off-dart `UserProductSearchType`; used `ProductSearchQueryConfiguration` instead of deprecated `UserProductSearchQueryConfiguration`
* `product_query.dart`: now that we use fully v3, we don't need the temporary field list for user-related queries with v2
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 2.0.0
* `user_preferences_account.dart`: now using new local class `UserSearchType`
* and reduced all off-dart imports to a single `import 'package:openfoodfacts/openfoodfacts.dart';`
2023-01-02 16:10:52 +01:00
61d9f39ae0 feat: web account deletion (#3416)
* feat: add webview for account deletion

* feat: add webview for account deletion

* clean(preferences): remove useless reasonController

* clean: fix variable naming

* refactor: add deletionwebview state private and remove l10n from path segments
2022-12-09 16:49:10 +01:00
cd8aaafc82 chore: migrate to OFF SDK 1.26.0 (#3153)
* fix: New off-dart version

* fix: Tests

* Update nutrition_container.dart

* Update registration_login_test.dart

* Code review

* fix: No osm subdomain

* Even simpler review
2022-10-16 11:49:01 +02:00
0400c18874 fix: Check if user credential still holds (#3077)
* check if user credential still holds

* changes suggested on the pr
2022-10-01 14:05:01 +02:00
97d36bc71c feat: Logs service (+ email attachment) (#2303)
* Logs service (+ email attachment)

* Fix flutter format warning

* Reformat code

* Remove fimber_io dependency to have our own implementations instead

* Add close:true to email dialog

* Add SENDTO query to AndroidManifest

* Remove useless comment
2022-06-23 15:14:28 +02:00
01c6a617b9 fix: #1722 robotoff resend anonymous (#2117) 2022-06-13 23:28:11 +02:00
955895d7df fix: BAD_DECRYPT Exception on invalid cipher (#1730)
* fix: BAD_DECRYPT Exception on invalid cipher

* Update user_management_provider.dart

* More comments + showing SnackBar

* Moving cred movment lower in the tree

* Moved back

* Await user credentials on app start

* Update packages/smooth_app/lib/data_models/user_management_provider.dart

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-05-04 15:38:01 +02:00
4fc9df61a8 fix: Login doesn't update ui (#1370) 2022-03-29 06:20:27 +02:00
f671955d2f fix: user management propoeses re login (#1228)
* refactor: Helper => UserManagementProvider

* Refactor: UserPreferencesPage for provider use

* Review
2022-03-17 18:06:33 +01:00