Simplify.
This commit is contained in:
parent
7d5571ffd2
commit
f903b83315
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue