mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-06 11:33:06 +02:00
Cleanup: rename to totalDuration and movingDuration.
This commit is contained in:
+3
-3
@@ -130,7 +130,7 @@ public class VoiceAnnouncementManager implements SharedPreferences.OnSharedPrefe
|
||||
updateNextTaskDistance();
|
||||
announce = true;
|
||||
}
|
||||
if (!trackStatistics.totalTime().minus(nextTotalTime).isNegative()) {
|
||||
if (!trackStatistics.totalDuration().minus(nextTotalTime).isNegative()) {
|
||||
updateNextDuration();
|
||||
announce = true;
|
||||
}
|
||||
@@ -196,9 +196,9 @@ public class VoiceAnnouncementManager implements SharedPreferences.OnSharedPrefe
|
||||
nextTotalTime = TOTALTIME_OFF;
|
||||
} else {
|
||||
|
||||
Duration intervalMod = Duration.ofMillis(trackStatistics.totalTime().toMillis() % totalTimeFrequency.toMillis());
|
||||
Duration intervalMod = Duration.ofMillis(trackStatistics.totalDuration().toMillis() % totalTimeFrequency.toMillis());
|
||||
|
||||
nextTotalTime = trackStatistics.totalTime().plus(totalTimeFrequency.minus(intervalMod));
|
||||
nextTotalTime = trackStatistics.totalDuration().plus(totalTimeFrequency.minus(intervalMod));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ class VoiceAnnouncementUtils {
|
||||
boolean hasTravelledDistance = !totalDistance.isZero();
|
||||
|
||||
// Announce time
|
||||
Duration movingTime = trackStatistics.movingTime();
|
||||
Duration movingTime = trackStatistics.movingDuration();
|
||||
if (shouldVoiceAnnounceMovingTime() && hasTravelledDistance && !movingTime.isZero()) {
|
||||
appendDuration(context, builder, movingTime);
|
||||
builder.append(".");
|
||||
|
||||
Reference in New Issue
Block a user