Skip to content

Commit c2bf7f0

Browse files
committed
Fixed accidental reset of PlaybackParameterDialog on initialization
1 parent 0fef4e6 commit c2bf7f0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private void initUI() {
213213

214214
getPitchControlModeComponentMappings()
215215
.forEach(this::setupPitchControlModeTextView);
216-
changePitchControlMode(isCurrentPitchControlModeSemitone());
216+
// Initialization is done at the end
217217

218218
// Pitch - Percent
219219
setText(binding.pitchPercentMinimumText, PlayerHelper::formatPitch, MIN_PITCH_OR_SPEED);
@@ -275,6 +275,9 @@ private void initUI() {
275275
skipSilence = isChecked;
276276
updateCallback();
277277
});
278+
279+
// PitchControlMode has to be initialized at the end because it requires the unhookCheckbox
280+
changePitchControlMode(isCurrentPitchControlModeSemitone());
278281
}
279282

280283
// -- General formatting --

0 commit comments

Comments
 (0)