WT1.1.18+8 repeats MAX
This commit is contained in:
@@ -91,7 +91,15 @@ class PackageApi {
|
||||
final Iterable json = jsonDecode(headRecord[1]);
|
||||
final List<TrainingPlan>? plans = json.map((plan) => TrainingPlan.fromJson(plan)).toList();
|
||||
|
||||
Cache().setTrainingPlans(plans);
|
||||
List<TrainingPlan> activePlans = [];
|
||||
if (plans != null) {
|
||||
plans.forEach((element) {
|
||||
if (element.active) {
|
||||
activePlans.add(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
Cache().setTrainingPlans(activePlans);
|
||||
} else if (headRecord[0] == "SplitTests") {
|
||||
final Iterable json = jsonDecode(headRecord[1]);
|
||||
final List<SplitTest>? tests = json.map((test) => SplitTest.fromJson(test)).toList();
|
||||
|
||||
Reference in New Issue
Block a user