Skip to content

Commit 92ee51b

Browse files
resolved issues
1 parent a6fcb70 commit 92ee51b

4 files changed

Lines changed: 4 additions & 13 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ public void initPlayer(boolean playOnReady) {
341341
@Override
342342
public void handleIntent(final Intent intent) {
343343
super.handleIntent(intent);
344+
344345
resetNotification();
345346
if (bigNotRemoteView != null)
346347
bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false);

app/src/main/java/org/schabi/newpipe/player/BasePlayer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ protected void initPlayback(@NonNull final PlayQueue queue,
332332
if (playQueueAdapter != null) playQueueAdapter.dispose();
333333
playQueueAdapter = new PlayQueueAdapter(context, playQueue);
334334

335-
if (isMuted) simpleExoPlayer.setVolume(0);
335+
simpleExoPlayer.setVolume(isMuted ? 0 : 1);
336336
}
337337

338338
public void destroyPlayer() {

app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,7 @@ protected void setShuffleButton(final ImageButton shuffleButton, final boolean s
401401
}
402402

403403
protected void setMuteButton(final ImageButton muteButton, final boolean isMuted) {
404-
if (isMuted) {
405-
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.white));
406-
} else {
407-
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.gray));
408-
409-
}
404+
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), isMuted ? R.color.white : R.color.gray));
410405
}
411406

412407

app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,6 @@ private void onMaybePlaybackAdapterChanged() {
687687
}
688688

689689
private void onMaybeMuteChanged(){
690-
if (player.isMuted()) {
691-
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.white));
692-
}
693-
else {
694-
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.gray));
695-
}
690+
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), player.isMuted() ? R.color.white : R.color.gray));
696691
}
697692
}

0 commit comments

Comments
 (0)