Improved documentation

This commit is contained in:
litetex 2021-10-15 20:16:34 +02:00
parent afc8db8f81
commit 2271ea4281
2 changed files with 12 additions and 5 deletions

View File

@ -56,6 +56,9 @@ public final class QueueItemMenuUtil {
.show(fragmentManager, "QueueItemMenuUtil@append_playlist")); .show(fragmentManager, "QueueItemMenuUtil@append_playlist"));
return true; return true;
case R.id.menu_item_channel_details: case R.id.menu_item_channel_details:
// An intent must be used here.
// Opening with FragmentManager transactions is not working,
// as PlayQueueActivity doesn't use fragments.
NavigationHelper.openChannelFragmentUsingIntent(context, item.getServiceId(), NavigationHelper.openChannelFragmentUsingIntent(context, item.getServiceId(),
item.getUploaderUrl(), item.getUploader()); item.getUploaderUrl(), item.getUploader());
return true; return true;

View File

@ -491,11 +491,15 @@ public final class NavigationHelper {
context.startActivity(intent); context.startActivity(intent);
} }
///////////////////////////////////////////////////// /**
// PlayQueueActivity doesn't use fragments so the // * Opens {@link ChannelFragment}.
// openChannelFragment method can't be used // * Use this instead of {@link #openChannelFragment(FragmentManager, int, String, String)}
// since that uses FragmentManager transactions. // * when no fragments are used / no FragmentManager is available.
///////////////////////////////////////////////////// * @param context
* @param serviceId
* @param url
* @param title
*/
public static void openChannelFragmentUsingIntent(final Context context, public static void openChannelFragmentUsingIntent(final Context context,
final int serviceId, final int serviceId,
final String url, final String url,