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 committed Oct 5, 2021
1 parent 4c5fc7f commit 1c9f68b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,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 1c9f68b

Please sign in to comment.