Skip to content

Commit

Permalink
fix: 2255 - safer setState call after async code (#3345)
Browse files Browse the repository at this point in the history
* fix: 2255 - safer setState call after async code

Impacted file:
* `history_page.dart`: safer setState call after async code

* fix: 2255 - after failed tests

Deleted file:
* `registration_login_test.dart`

Impacted file:
* `labeler.yml`: removed a failing test that had more to do with off-dart than with Smoothie, and that relied on the notoriously unstable TEST env
  • Loading branch information
monsieurtanuki authored Nov 25, 2022
1 parent 36d615a commit dd65222
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 67 deletions.
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ tests:
- packages/smooth_app/test/plural_translation_test.dart
- packages/smooth_app/test/smooth_ui_library/basic_test.dart
- packages/smooth_app/test/utils/string_extensions_test.dart
- packages/smooth_app/test/users/registration_login_test.dart
- packages/smooth_app/test/dialogs/generic_lib/dialogs_test.dart
- packages/smooth_app/test/pages/user_preferences_page_test.dart
- packages/smooth_app/test/utils/text_input_formatters_tests.dart
Expand Down
3 changes: 3 additions & 0 deletions packages/smooth_app/lib/pages/history_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class _HistoryPageState extends State<HistoryPage> {
void didChangeDependencies() {
super.didChangeDependencies();
DaoProductList(context.watch<LocalDatabase>()).get(productList).then((_) {
if (!mounted) {
return;
}
setState(() {});
});
}
Expand Down
66 changes: 0 additions & 66 deletions packages/smooth_app/test/users/registration_login_test.dart

This file was deleted.

0 comments on commit dd65222

Please sign in to comment.