WT1.1.10 compact test, paralell test
This commit is contained in:
@@ -19,7 +19,6 @@ class ExerciseTreeApi with Logging {
|
||||
|
||||
if (exerciseTree != null) {
|
||||
await Future.forEach(exerciseTree, (element) async {
|
||||
//exerciseTree.forEach((element) async {
|
||||
element.imageUrl = await buildImage(element.imageUrl, element.treeId);
|
||||
});
|
||||
log("ExerciseTree downloaded");
|
||||
@@ -55,10 +54,11 @@ class ExerciseTreeApi with Logging {
|
||||
if (parent.exerciseTreeChildId == element.treeId) {
|
||||
if (index > 0) {
|
||||
ExerciseTree newElement = element.copy(parent.exerciseTreeParentId);
|
||||
newElement.sort = parent.sort ?? 0;
|
||||
exerciseTree.add(newElement);
|
||||
} else {
|
||||
element.parentId = parent.exerciseTreeParentId;
|
||||
element.sort = parent.sort;
|
||||
element.sort = parent.sort ?? 0;
|
||||
exerciseTree[treeIndex].parentId = parent.exerciseTreeParentId;
|
||||
}
|
||||
index++;
|
||||
|
||||
@@ -66,6 +66,7 @@ class PackageApi {
|
||||
exerciseTree = this.getExerciseTreeParents(exerciseTree, exerciseTreeParents);
|
||||
if (exerciseTree != null) {
|
||||
await Future.forEach(exerciseTree, (element) async {
|
||||
print("Tree ${element.toJson()}");
|
||||
element.imageUrl = await ExerciseTreeApi().buildImage(element.imageUrl, element.treeId);
|
||||
});
|
||||
Cache().setExerciseTree(exerciseTree);
|
||||
@@ -84,10 +85,13 @@ class PackageApi {
|
||||
if (parent.exerciseTreeChildId == element.treeId) {
|
||||
if (index > 0) {
|
||||
ExerciseTree newElement = element.copy(parent.exerciseTreeParentId);
|
||||
newElement.sort = parent.sort;
|
||||
exerciseTree.add(newElement);
|
||||
} else {
|
||||
element.parentId = parent.exerciseTreeParentId;
|
||||
element.sort = parent.sort;
|
||||
exerciseTree[treeIndex].parentId = parent.exerciseTreeParentId;
|
||||
exerciseTree[treeIndex].sort = parent.sort;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user