This commit is contained in:
Yegor Vialov 2018-10-07 10:41:41 +03:00
parent ec71200ab0
commit 253316fb1f
3 changed files with 1 additions and 5 deletions

View File

@ -260,7 +260,6 @@ class _EntityWidgetState extends State<EntityWidget> {
} }
Widget _buildBadgeWidget(BuildContext context) { Widget _buildBadgeWidget(BuildContext context) {
//TODO separate this by different Entity classes
double iconSize = 26.0; double iconSize = 26.0;
Widget badgeIcon; Widget badgeIcon;
String onBadgeTextValue; String onBadgeTextValue;

View File

@ -51,8 +51,7 @@ class EntityCollection {
} }
void updateFromRaw(Map rawEntityData) { void updateFromRaw(Map rawEntityData) {
//TODO pass entity in this function and call update from it get("${rawEntityData["entity_id"]}")?.update(rawEntityData);
_entities[rawEntityData["entity_id"]].update(rawEntityData);
} }
Entity get(String entityId) { Entity get(String entityId) {
@ -61,7 +60,6 @@ class EntityCollection {
List<Entity> getAll(List ids) { List<Entity> getAll(List ids) {
List<Entity> result = []; List<Entity> result = [];
//TODO optimize this
ids.forEach((id){ ids.forEach((id){
Entity en = get(id); Entity en = get(id);
if (en != null) { if (en != null) {

View File

@ -30,7 +30,6 @@ class ViewBuilder{
View _composeDefaultView() { View _composeDefaultView() {
Map<String, List<String>> userGroupsList = entityCollection.getDefaultViewTopLevelEntities(); Map<String, List<String>> userGroupsList = entityCollection.getDefaultViewTopLevelEntities();
List<Entity> entitiesForView = []; List<Entity> entitiesForView = [];
//TODO WTF? Why two arrays?
userGroupsList["userGroups"].forEach((groupId){ userGroupsList["userGroups"].forEach((groupId){
entitiesForView.add(entityCollection.get(groupId)); entitiesForView.add(entityCollection.get(groupId));
}); });