Skip to content

Commit

Permalink
GH-129: SonarQube changes
Browse files Browse the repository at this point in the history
Renamed altitudeGain_n and Renamed altitudeLoss_n based on SonarQube issue
  • Loading branch information
kevwad committed Apr 26, 2024
1 parent 0bebefe commit 57add1a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,20 @@ private void updateUI() {

// Set altitude gain and loss
{
Float altitudeGain_m = trackStatistics.getTotalAltitudeGain();
Float altitudeLoss_m = trackStatistics.getTotalAltitudeLoss();
Float altitudeGain = trackStatistics.getTotalAltitudeGain();
Float altitudeLoss = trackStatistics.getTotalAltitudeLoss();

Pair<String, String> parts;

parts = StringUtils.getAltitudeParts(getContext(), altitudeGain_m, unitSystem);
parts = StringUtils.getAltitudeParts(getContext(), altitudeGain, unitSystem);
viewBinding.statsAltitudeGainValue.setText(parts.first);
viewBinding.statsAltitudeGainUnit.setText(parts.second);

parts = StringUtils.getAltitudeParts(getContext(), altitudeLoss_m, unitSystem);
parts = StringUtils.getAltitudeParts(getContext(), altitudeLoss, unitSystem);
viewBinding.statsAltitudeLossValue.setText(parts.first);
viewBinding.statsAltitudeLossUnit.setText(parts.second);

boolean show = altitudeGain_m != null && altitudeLoss_m != null;
boolean show = altitudeGain != null && altitudeLoss != null;
viewBinding.statsAltitudeGroup.setVisibility(show ? View.VISIBLE : View.GONE);
}
}
Expand Down

0 comments on commit 57add1a

Please sign in to comment.