Simplify.

This commit is contained in:
Johannes Mockenhaupt 2017-08-28 20:32:41 +02:00
parent 7d5571ffd2
commit f903b83315
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -181,11 +181,9 @@ public class SetTbrCommand extends BaseCommand {
long durationSteps = difference / 15; long durationSteps = difference / 15;
long durationAfterInitialSteps = currentDuration + (durationSteps * 15); long durationAfterInitialSteps = currentDuration + (durationSteps * 15);
long finalSteps = durationSteps; if (durationAfterInitialSteps < duration) return durationSteps + 1;
if (durationAfterInitialSteps < duration) finalSteps++; else if (durationAfterInitialSteps > duration) return durationSteps - 1;
else if (durationAfterInitialSteps > duration) finalSteps--; else return durationSteps;
return finalSteps;
} }
private void verifyDisplayedTbrDuration(boolean increasingPercentage) { private void verifyDisplayedTbrDuration(boolean increasingPercentage) {