diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java index eea2df52c7..206e27ba9e 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java @@ -181,11 +181,9 @@ public class SetTbrCommand extends BaseCommand { long durationSteps = difference / 15; long durationAfterInitialSteps = currentDuration + (durationSteps * 15); - long finalSteps = durationSteps; - if (durationAfterInitialSteps < duration) finalSteps++; - else if (durationAfterInitialSteps > duration) finalSteps--; - - return finalSteps; + if (durationAfterInitialSteps < duration) return durationSteps + 1; + else if (durationAfterInitialSteps > duration) return durationSteps - 1; + else return durationSteps; } private void verifyDisplayedTbrDuration(boolean increasingPercentage) {