pass serviceId instead of item, reduce duplication

This commit is contained in:
khimaros 2021-01-02 11:24:33 -08:00
parent 0030b426b0
commit f218a99c38
6 changed files with 7 additions and 12 deletions

View file

@ -333,7 +333,6 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
}
}
protected void showStreamDialog(final StreamInfoItem item) {
final Context context = getContext();
final Activity activity = getActivity();
@ -360,7 +359,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
StreamDialogEntry.share
));
}
if (KoreUtil.shouldShowPlayWithKodi(context, item)) {
if (KoreUtil.shouldShowPlayWithKodi(context, item.getServiceId())) {
entries.add(StreamDialogEntry.play_with_kodi);
}
StreamDialogEntry.setEnabledEntries(entries);

View file

@ -175,7 +175,7 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
StreamDialogEntry.share
));
}
if (KoreUtil.shouldShowPlayWithKodi(context, item)) {
if (KoreUtil.shouldShowPlayWithKodi(context, item.getServiceId())) {
entries.add(StreamDialogEntry.play_with_kodi);
}
StreamDialogEntry.setEnabledEntries(entries);