From 253316fb1feb4a9ed8c549d615be8c8d5e2ea4ed Mon Sep 17 00:00:00 2001 From: Yegor Vialov Date: Sun, 7 Oct 2018 10:41:41 +0300 Subject: [PATCH] TODOs --- lib/entity_class/entity.class.dart | 1 - lib/entity_collection.class.dart | 4 +--- lib/view_builder.class.dart | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/entity_class/entity.class.dart b/lib/entity_class/entity.class.dart index b0c33a2..936f08f 100644 --- a/lib/entity_class/entity.class.dart +++ b/lib/entity_class/entity.class.dart @@ -260,7 +260,6 @@ class _EntityWidgetState extends State { } Widget _buildBadgeWidget(BuildContext context) { - //TODO separate this by different Entity classes double iconSize = 26.0; Widget badgeIcon; String onBadgeTextValue; diff --git a/lib/entity_collection.class.dart b/lib/entity_collection.class.dart index 3bcea19..d73d161 100644 --- a/lib/entity_collection.class.dart +++ b/lib/entity_collection.class.dart @@ -51,8 +51,7 @@ class EntityCollection { } void updateFromRaw(Map rawEntityData) { - //TODO pass entity in this function and call update from it - _entities[rawEntityData["entity_id"]].update(rawEntityData); + get("${rawEntityData["entity_id"]}")?.update(rawEntityData); } Entity get(String entityId) { @@ -61,7 +60,6 @@ class EntityCollection { List getAll(List ids) { List result = []; - //TODO optimize this ids.forEach((id){ Entity en = get(id); if (en != null) { diff --git a/lib/view_builder.class.dart b/lib/view_builder.class.dart index 2b418c0..e88c082 100644 --- a/lib/view_builder.class.dart +++ b/lib/view_builder.class.dart @@ -30,7 +30,6 @@ class ViewBuilder{ View _composeDefaultView() { Map> userGroupsList = entityCollection.getDefaultViewTopLevelEntities(); List entitiesForView = []; - //TODO WTF? Why two arrays? userGroupsList["userGroups"].forEach((groupId){ entitiesForView.add(entityCollection.get(groupId)); });