forked from upstream-mirrors/OpenTracks
Re-calculate the calorie while user change the activity type of track. Show standard "value_unknown" (-) when the activity type is not supported.
This commit is contained in:
@@ -192,8 +192,7 @@ public class MarkerDetailFragment extends Fragment {
|
||||
TextView name = (TextView) getView().findViewById(R.id.marker_detail_statistics_name);
|
||||
name.setText(getString(R.string.generic_name_line, waypoint.getName()));
|
||||
|
||||
StatsUtils.setTripStatisticsValues(getActivity(), waypoint.getTripStatistics(),
|
||||
waypoint.getTrackId());
|
||||
StatsUtils.setTripStatisticsValues(getActivity(), waypoint.getTripStatistics());
|
||||
StatsUtils.setLocationValues(getActivity(), waypoint.getLocation(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,11 +259,7 @@ public class StatsFragment extends Fragment implements TrackDataListener {
|
||||
* Updates the UI.
|
||||
*/
|
||||
private void updateUi(FragmentActivity activity) {
|
||||
StatsUtils.setTripStatisticsValues(
|
||||
activity,
|
||||
lastTripStatistics,
|
||||
trackDataHub == null ? PreferencesUtils.RECORDING_TRACK_ID_DEFAULT : trackDataHub
|
||||
.getSelectedTrackId());
|
||||
StatsUtils.setTripStatisticsValues(activity, lastTripStatistics);
|
||||
StatsUtils.setLocationValues(activity, lastLocation, isSelectedTrackRecording());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user