-
-
Notifications
You must be signed in to change notification settings - Fork 314
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: 4423 - specific "Not connected to internet" displayed error #4455
feat: 4423 - specific "Not connected to internet" displayed error #4455
Conversation
Impacted files: * `barcode_product_query.dart`: removed useless `try` as already `catch`'ed * `continuous_scan_model.dart`: removed the `codeInvalid` case that could never happen * `fetched_product.dart`: refactored with explicit constructors and additional exception and connectivity fields; removed the `codeInvalid` case that could never happen * `new_product_page.dart`: minor refactoring * `product_dialog_helper.dart`: removed the `codeInvalid` case that could never happen; minor refactoting * `product_list_item_simple.dart`: removed the `codeInvalid` case that could never happen * `product_loader_page.dart`: removed useless `try` as already `catch`'ed * `product_refresher.dart`: added a specific "You're not connected to the internet" error message; refactored using more `FetchedProduct`; removed useless method * `pubspec.lock`: wtf * `pubspec.yaml`: added package `connectivity_plus` * `question_card.dart`: refactored using `FetchedProduct`
Codecov Report
@@ Coverage Diff @@
## develop #4455 +/- ##
========================================
Coverage 10.31% 10.32%
========================================
Files 296 296
Lines 15311 15328 +17
========================================
+ Hits 1579 1582 +3
- Misses 13732 13746 +14
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
You can test this PR on: Android |
Impacted files: * `fetched_product.dart`: added field `failedPingedHost` where we store the host that we couldn't ping * `generated_plugin_registrant.cc`: wtf * `generated_plugins.cmake`: wtf * `GeneratedPluginRegistrant.swift`: wtf * `main.dart`: registered `DartPingIOS` * `product_refresher.dart`: now trying to ping the server if exception and connection * `pubspec.lock`: wtf * `pubspec.yaml: added packages `dart_ping` and `dart_ping_ios`
Additional possibility: "server down". Let me sum up what may happen when we refresh a product:
|
Analyzing smooth-app... info • Sort directive sections alphabetically • packages/smooth_app/lib/pages/preferences/user_preferences_dev_mode.dart:10:1 • directives_ordering |
@teolemon Done. |
I think that would be way better that way. |
@g123k That's the way it is coded in the latest version of the PR, so feel free to approve.
If I were in a world where I had only ideas that were immediately approved, I would directly add the translations. |
Ok, so I approve your PR, so it's OK to translate ;) |
Impacted files: * `app_en.arb`: 4 new labels when we couldn't retrieve a product (not found, no internet, server down, server error) * `product_refresher.dart`: used the new labels
What
Screenshot
Part of
Impacted files
barcode_product_query.dart
: removed uselesstry
as alreadycatch
'edcontinuous_scan_model.dart
: removed thecodeInvalid
case that could never happenfetched_product.dart
: refactored with explicit constructors and additional exception and connectivity fields; removed thecodeInvalid
case that could never happennew_product_page.dart
: minor refactoringproduct_dialog_helper.dart
: removed thecodeInvalid
case that could never happen; minor refactotingproduct_list_item_simple.dart
: removed thecodeInvalid
case that could never happenproduct_loader_page.dart
: removed uselesstry
as alreadycatch
'edproduct_refresher.dart
: added a specific "You're not connected to the internet" error message; refactored using moreFetchedProduct
; removed useless methodpubspec.lock
: wtfpubspec.yaml
: added packageconnectivity_plus
question_card.dart
: refactored usingFetchedProduct