forked from upstream-mirrors/OpenTracks
UX improvement, not showing total time when not recording
This commit is contained in:
@@ -120,11 +120,14 @@ public class TrackController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handler.removeCallbacks(updateTotalTimeRunnable);
|
handler.removeCallbacks(updateTotalTimeRunnable);
|
||||||
totalTime = isRecording ? getTotalTime() : 0L;
|
totalTimeTextView.setVisibility(isRecording ? View.VISIBLE : View.INVISIBLE);
|
||||||
totalTimeTextView.setText(StringUtils.formatElapsedTimeWithHour(totalTime));
|
if (isRecording) {
|
||||||
if (isRecording && !isPaused) {
|
totalTime = getTotalTime();
|
||||||
totalTimeTimestamp = System.currentTimeMillis();
|
totalTimeTextView.setText(StringUtils.formatElapsedTimeWithHour(totalTime));
|
||||||
handler.postDelayed(updateTotalTimeRunnable, ONE_SECOND);
|
if (!isPaused) {
|
||||||
|
totalTimeTimestamp = System.currentTimeMillis();
|
||||||
|
handler.postDelayed(updateTotalTimeRunnable, ONE_SECOND);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user