WT1.1.10+6 backwards compatibility with the menu

This commit is contained in:
bossanyit
2021-03-28 14:45:10 +02:00
parent 1962ba24cb
commit a656562c49
2 changed files with 9 additions and 5 deletions
+6 -2
View File
@@ -44,7 +44,8 @@ class WorkoutTreeRepository with Logging {
if (treeItem.active == true) {
String treeName = isEnglish ? treeItem.name : treeItem.nameTranslation;
bool is1RM = treeItem.name.contains("Muscle") || treeItem.name.contains("Shape") ? true : false;
bool is1RM =
treeItem.name.contains("Muscle") || treeItem.name.contains("Shape") || treeItem.name.contains("Strength") ? true : false;
if (!is1RM) {
is1RM = this.isParent1RM(treeItem.parentId);
}
@@ -296,7 +297,10 @@ class WorkoutTreeRepository with Logging {
sortedTree = SplayTreeMap<String, List<WorkoutMenuTree>>();
tree.forEach((key, value) {
WorkoutMenuTree workoutTree = value as WorkoutMenuTree;
if (!workoutTree.nameEnglish.contains('Muscle Build') && workoutTree.is1RM && workoutTree.exerciseTypeId == 0) {
if (!workoutTree.nameEnglish.contains('Muscle Build') &&
!workoutTree.nameEnglish.contains('Strength') &&
workoutTree.is1RM &&
workoutTree.exerciseTypeId == 0) {
String treeName = getAntagonistSort(workoutTree.nameEnglish) + ". " + workoutTree.name;
//print("TreeName $treeName ${workoutTree.name}");
sortedTree[treeName] = this.getBranchList(workoutTree.id);