Skip to content

Commit

Permalink
fix: 3529 - fixed the too strong link between product data and edit p…
Browse files Browse the repository at this point in the history
…ages (#3561)

Impacted file:
* `simple_input_page_helpers.dart`: copy of the product data
  • Loading branch information
monsieurtanuki authored Jan 10, 2023
1 parent e67c257 commit 0af3c68
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ abstract class AbstractSimpleInputPageHelper extends ChangeNotifier {
/// Starts from scratch with a new (or refreshed) [Product].
void reInit(final Product product) {
this.product = product;
_terms = initTerms();
_terms = List<String>.from(initTerms());
_changed = false;
notifyListeners();
}

final String _separator = ',';

/// Returns the terms as they were initially in the product.
///
/// WARNING: this list must be copied; if not you may alter the product.
/// cf. https://github.com/openfoodfacts/smooth-app/issues/3529
@protected
List<String> initTerms();

Expand Down

0 comments on commit 0af3c68

Please sign in to comment.