mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 17:10:33 +00:00
-Removed duplicate dialog open instances in service player activity.
This commit is contained in:
parent
72eaff148c
commit
02f48ccc7f
@ -433,12 +433,10 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||||||
player.onShuffleClicked();
|
player.onShuffleClicked();
|
||||||
|
|
||||||
} else if (view.getId() == playbackSpeedButton.getId()) {
|
} else if (view.getId() == playbackSpeedButton.getId()) {
|
||||||
PlaybackParameterDialog.newInstance(player.getPlaybackSpeed(),
|
openPlaybackParameterDialog();
|
||||||
player.getPlaybackPitch()).show(getSupportFragmentManager(), getTag());
|
|
||||||
|
|
||||||
} else if (view.getId() == playbackPitchButton.getId()) {
|
} else if (view.getId() == playbackPitchButton.getId()) {
|
||||||
PlaybackParameterDialog.newInstance(player.getPlaybackSpeed(),
|
openPlaybackParameterDialog();
|
||||||
player.getPlaybackPitch()).show(getSupportFragmentManager(), getTag());
|
|
||||||
|
|
||||||
} else if (view.getId() == metadata.getId()) {
|
} else if (view.getId() == metadata.getId()) {
|
||||||
scrollToSelected();
|
scrollToSelected();
|
||||||
@ -450,9 +448,15 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// Playback Parameters Listener
|
// Playback Parameters
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
private void openPlaybackParameterDialog() {
|
||||||
|
if (player == null) return;
|
||||||
|
PlaybackParameterDialog.newInstance(player.getPlaybackSpeed(),
|
||||||
|
player.getPlaybackPitch()).show(getSupportFragmentManager(), getTag());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlaybackParameterChanged(float playbackTempo, float playbackPitch) {
|
public void onPlaybackParameterChanged(float playbackTempo, float playbackPitch) {
|
||||||
if (player != null) player.setPlaybackParameters(playbackTempo, playbackPitch);
|
if (player != null) player.setPlaybackParameters(playbackTempo, playbackPitch);
|
||||||
|
Loading…
Reference in New Issue
Block a user