Skip to content

Commit

Permalink
Fix clicking timestamp shows Toast "Playing in popup mode"
Browse files Browse the repository at this point in the history
  • Loading branch information
vhouriet authored and Atemu committed Nov 1, 2021
1 parent a769e28 commit 0f8ff8f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public static void playOnPopupPlayer(final Context context,
return;
}

Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show();
if (PlayerHolder.getInstance().getType() != PlayerType.POPUP) {
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 Down

0 comments on commit 0f8ff8f

Please sign in to comment.