mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
UX improvement, not showing total time when not recording
This commit is contained in:
@@ -120,11 +120,14 @@ public class TrackController {
|
||||
}
|
||||
|
||||
handler.removeCallbacks(updateTotalTimeRunnable);
|
||||
totalTime = isRecording ? getTotalTime() : 0L;
|
||||
totalTimeTextView.setText(StringUtils.formatElapsedTimeWithHour(totalTime));
|
||||
if (isRecording && !isPaused) {
|
||||
totalTimeTimestamp = System.currentTimeMillis();
|
||||
handler.postDelayed(updateTotalTimeRunnable, ONE_SECOND);
|
||||
totalTimeTextView.setVisibility(isRecording ? View.VISIBLE : View.INVISIBLE);
|
||||
if (isRecording) {
|
||||
totalTime = getTotalTime();
|
||||
totalTimeTextView.setText(StringUtils.formatElapsedTimeWithHour(totalTime));
|
||||
if (!isPaused) {
|
||||
totalTimeTimestamp = System.currentTimeMillis();
|
||||
handler.postDelayed(updateTotalTimeRunnable, ONE_SECOND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user