Skip to content

Commit

Permalink
Merged #65, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Primael Quemerais committed Jan 8, 2021
1 parent 50c4889 commit 8d4b943
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
9 changes: 5 additions & 4 deletions packages/smooth_app/lib/data_models/match.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:openfoodfacts/model/AttributeGroups.dart';
import 'package:openfoodfacts/model/Attribute.dart';
import 'package:openfoodfacts/model/AttributeGroup.dart';
import 'package:smooth_app/data_models/user_preferences_model.dart';
import 'package:openfoodfacts/model/Product.dart';
import 'package:smooth_app/structures/ranked_product.dart';
Expand All @@ -11,13 +12,13 @@ class Match {
final UserPreferences userPreferences,
final UserPreferencesModel userPreferencesModel,
) {
final AttributeGroups attributeGroups = product.attributeGroups;
final List<AttributeGroup> attributeGroups = product.attributeGroups;
if (attributeGroups == null) {
_status = null;
return;
}
for (final List<Attribute> attributes in attributeGroups.groups.values) {
for (final Attribute attribute in attributes) {
for (final AttributeGroup group in attributeGroups) {
for (final Attribute attribute in group.attributes) {
final String variable = attribute.id;
final PreferencesValue preferencesValue =
userPreferencesModel.getPreferencesValue(variable, userPreferences);
Expand Down
15 changes: 0 additions & 15 deletions packages/smooth_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,6 @@ class SmoothApp extends StatelessWidget {
);
}

/*SmoothNavigationScreenModel _generateOrganizationScreenModel() {
return SmoothNavigationScreenModel(
icon: Container(
padding: EdgeInsets.all(_navigationIconPadding),
child: SvgPicture.asset(
'assets/ikonate_thin/organize.svg',
width: _navigationIconSize,
height: _navigationIconSize,
),
),
title: 'Organize',
page: OrganizationPage(),
);
}*/

SmoothNavigationScreenModel _generateCollaborationScreenModel(
BuildContext context) {
return SmoothNavigationScreenModel(
Expand Down

0 comments on commit 8d4b943

Please sign in to comment.