pass serviceId instead of item, reduce duplication
This commit is contained in:
parent
48a5107296
commit
ac59382b84
6 changed files with 7 additions and 12 deletions
|
|
@ -932,9 +932,7 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
service.getString(R.string.show_play_with_kodi_key), false);
|
||||
// show kodi button if it supports the current service and it is enabled in settings
|
||||
final boolean showKodiButton = playQueue != null && playQueue.getItem() != null
|
||||
&& KoreUtil.isServiceSupportedByKore(playQueue.getItem().getServiceId())
|
||||
&& PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getBoolean(context.getString(R.string.show_play_with_kodi_key), false);
|
||||
&& KoreUtil.shouldShowPlayWithKodi(context, playQueue.getItem().getServiceId());
|
||||
playWithKodi.setVisibility(videoPlayerSelected() && kodiEnabled && showKodiButton
|
||||
? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue