mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-12 07:10:55 +00:00
Changed display of the course area back to normal, one might consider to change the display of the race course in the regatta overview to show more meta information about a race course
This commit is contained in:
1 parent
3fd05f51c7
commit
0404092fb2
2 files changed
+1
-13
No files matched your search
-6
@@ -204,12 +204,6 @@ public class RaceInfoFragment extends RaceFragment implements RaceStateChangedLi
|
||||
CourseBase courseDesign = getRace().getState().getCourseDesign();
|
||||
if (courseDesign.getName() != null) {
|
||||
String courseName = courseDesign.getName();
|
||||
if (courseName.contains("(")){
|
||||
//New course name in the format: [CourseType] Rounds:X ([Old CourseName])
|
||||
//e.g. Triangle Rounds:3 (7 3)
|
||||
String pattern = ".*\\((.+?)\\).*";
|
||||
courseName = courseName.replaceAll(pattern, "$1");
|
||||
}
|
||||
courseInfoHeader.setText(String.format(getString(R.string.running_on_course), courseName));
|
||||
} else if (Util.isEmpty(courseDesign.getWaypoints())) {
|
||||
courseInfoHeader.setText(getString(R.string.running_on_unknown));
|
||||
|
||||
+1
-7
@@ -69,13 +69,7 @@ public class RaceChooseCourseByLabelDialog extends RaceDialogFragment {
|
||||
Button selectedButton = (Button) v;
|
||||
String internalCourseName = (String) selectedButton.getText();
|
||||
|
||||
String[] courseLayoutsAndNames = getActivity().getResources().getStringArray(R.array.course_routes);
|
||||
String[] courseNumberAndRounds = internalCourseName.split(" ");
|
||||
|
||||
int courseId = Integer.parseInt(courseNumberAndRounds[0]);
|
||||
String courseName = courseLayoutsAndNames[courseId].split(",")[1];
|
||||
|
||||
CourseBase courseLayout = new CourseDataImpl(courseName+" Rounds:"+courseNumberAndRounds[1]+" ("+internalCourseName+")");
|
||||
CourseBase courseLayout = new CourseDataImpl(internalCourseName);
|
||||
|
||||
getRace().getState().setCourseDesign(courseLayout);
|
||||
dismiss();
|
||||
|
||||
Reference in new issue
Block a user