Merge pull request #6421 from TeamNewPipe/fix/playback_speed

Fix playback speed not being updated in PlayQueueAcitvity
pull/6430/head
Stypox 2021-06-05 13:46:45 +02:00 zatwierdzone przez GitHub
commit 9bf4eff173
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -15,6 +15,7 @@ import android.view.ViewGroup;
import android.widget.PopupMenu;
import android.widget.SeekBar;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
@ -456,6 +457,7 @@ public final class PlayQueueActivity extends AppCompatActivity
final boolean playbackSkipSilence) {
if (player != null) {
player.setPlaybackParameters(playbackTempo, playbackPitch, playbackSkipSilence);
onPlaybackParameterChanged(player.getPlaybackParameters());
}
}
@ -639,7 +641,7 @@ public final class PlayQueueActivity extends AppCompatActivity
queueControlBinding.controlShuffle.setImageAlpha(shuffleAlpha);
}
private void onPlaybackParameterChanged(final PlaybackParameters parameters) {
private void onPlaybackParameterChanged(@Nullable final PlaybackParameters parameters) {
if (parameters != null) {
if (menu != null && player != null) {
final MenuItem item = menu.findItem(R.id.action_playback_speed);