mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Fix merge conflicts
This commit is contained in:
parent
1dc146322c
commit
a311519314
@ -27,6 +27,7 @@ import androidx.preference.PreferenceManager;
|
|||||||
import org.schabi.newpipe.R;
|
import org.schabi.newpipe.R;
|
||||||
import org.schabi.newpipe.databinding.DialogPlaybackParameterBinding;
|
import org.schabi.newpipe.databinding.DialogPlaybackParameterBinding;
|
||||||
import org.schabi.newpipe.player.Player;
|
import org.schabi.newpipe.player.Player;
|
||||||
|
import org.schabi.newpipe.util.SimpleOnSeekBarChangeListener;
|
||||||
import org.schabi.newpipe.util.SliderStrategy;
|
import org.schabi.newpipe.util.SliderStrategy;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -37,6 +38,8 @@ import java.util.function.DoubleConsumer;
|
|||||||
import java.util.function.DoubleFunction;
|
import java.util.function.DoubleFunction;
|
||||||
import java.util.function.DoubleSupplier;
|
import java.util.function.DoubleSupplier;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import icepick.Icepick;
|
import icepick.Icepick;
|
||||||
import icepick.State;
|
import icepick.State;
|
||||||
|
|
||||||
@ -493,25 +496,16 @@ public class PlaybackParameterDialog extends DialogFragment {
|
|||||||
final SliderStrategy sliderStrategy,
|
final SliderStrategy sliderStrategy,
|
||||||
final DoubleConsumer newValueConsumer
|
final DoubleConsumer newValueConsumer
|
||||||
) {
|
) {
|
||||||
return new SeekBar.OnSeekBarChangeListener() {
|
return new SimpleOnSeekBarChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onProgressChanged(final SeekBar seekBar, final int progress,
|
public void onProgressChanged(@Nonnull final SeekBar seekBar,
|
||||||
|
final int progress,
|
||||||
final boolean fromUser) {
|
final boolean fromUser) {
|
||||||
if (fromUser) { // ensure that the user triggered the change
|
if (fromUser) { // ensure that the user triggered the change
|
||||||
newValueConsumer.accept(sliderStrategy.valueOf(progress));
|
newValueConsumer.accept(sliderStrategy.valueOf(progress));
|
||||||
updateCallback();
|
updateCallback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStartTrackingTouch(final SeekBar seekBar) {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStopTrackingTouch(final SeekBar seekBar) {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user