Skip to content

Commit

Permalink
Merge pull request #7614 from litetex/revert-7568
Browse files Browse the repository at this point in the history
Revert #7568
  • Loading branch information
Stypox authored Jan 23, 2022
2 parents 9f50391 + e127db6 commit 1531a51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 3 additions & 9 deletions app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,8 @@ public static void playOnPopupPlayer(final Context context,
return;
}

if (PlayerHolder.getInstance().getType() != PlayerType.POPUP) {
Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show();
}
Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show();

final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback);
intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.POPUP.ordinal());
ContextCompat.startForegroundService(context, intent);
Expand All @@ -168,12 +167,7 @@ public static void playOnPopupPlayer(final Context context,
public static void playOnBackgroundPlayer(final Context context,
final PlayQueue queue,
final boolean resumePlayback) {
Toast.makeText(
context,
PlayerHolder.getInstance().getType() == PlayerType.AUDIO
? R.string.background_player_already_playing_toast
: R.string.background_player_playing_toast,
Toast.LENGTH_SHORT)
Toast.makeText(context, R.string.background_player_playing_toast, Toast.LENGTH_SHORT)
.show();

final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback);
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
<string name="settings_category_updates_title">Updates</string>
<string name="settings_category_notification_title">Notification</string>
<string name="background_player_playing_toast">Playing in background</string>
<string name="background_player_already_playing_toast">Already playing in background</string>
<string name="popup_playing_toast">Playing in popup mode</string>
<string name="content">Content</string>
<string name="show_age_restricted_content_title">Show age restricted content</string>
Expand Down

0 comments on commit 1531a51

Please sign in to comment.