Skip to content

Commit

Permalink
Bugfix: TrackList should only mark the currently recording track as r…
Browse files Browse the repository at this point in the history
…ecording.
  • Loading branch information
dennisguse committed Sep 26, 2023
1 parent 2b08eb3 commit fda9ef9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ public void bind(Cursor track) {
int iconId = activityType.getIconDrawableId();
int iconDesc = R.string.image_track;

if (recordingStatus.isRecording()) {
boolean isRecordingThisTrackRecording = trackId.equals(recordingStatus.trackId());
if (isRecordingThisTrackRecording) {
iconId = R.drawable.ic_track_recording;
iconDesc = R.string.image_record;
}
Expand All @@ -228,7 +229,7 @@ public void bind(Cursor track) {

viewBinding.trackListItemName.setText(name);

String timeDistanceText = ListItemUtils.getTimeDistanceText(context, unitSystem, recordingStatus.isRecording(), totalTime, totalDistance, markerCount);
String timeDistanceText = ListItemUtils.getTimeDistanceText(context, unitSystem, isRecordingThisTrackRecording, totalTime, totalDistance, markerCount);
viewBinding.trackListItemTimeDistance.setText(timeDistanceText);

viewBinding.trackListItemMarkerCountIcon.setVisibility(markerCount > 0 ? View.VISIBLE : View.GONE);
Expand Down

0 comments on commit fda9ef9

Please sign in to comment.