From ec71200ab054e856c4adb2e8061b269bee48d62e Mon Sep 17 00:00:00 2001 From: Yegor Vialov Date: Sun, 7 Oct 2018 10:36:50 +0300 Subject: [PATCH] Resolves #127 Fix entities order in card --- lib/entity_collection.class.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/entity_collection.class.dart b/lib/entity_collection.class.dart index 89fe4b9..3bcea19 100644 --- a/lib/entity_collection.class.dart +++ b/lib/entity_collection.class.dart @@ -61,9 +61,11 @@ class EntityCollection { List getAll(List ids) { List result = []; - _entities.forEach((id, Entity entity){ - if (ids.contains(id)) { - result.add(entity); + //TODO optimize this + ids.forEach((id){ + Entity en = get(id); + if (en != null) { + result.add(en); } }); return result;