address pull request feedback

This commit is contained in:
khimaros 2020-12-30 14:40:21 -08:00
parent 100ace08b8
commit 0030b426b0
6 changed files with 17 additions and 24 deletions

View file

@ -360,11 +360,8 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
StreamDialogEntry.share
));
}
final boolean enableKodiEntry = KoreUtil.isServiceSupportedByKore(item.getServiceId())
&& PreferenceManager.getDefaultSharedPreferences(context)
.getBoolean(context.getString(R.string.show_play_with_kodi_key), false);
if (enableKodiEntry) {
entries.add(StreamDialogEntry.play_on_kodi);
if (KoreUtil.shouldShowPlayWithKodi(context, item)) {
entries.add(StreamDialogEntry.play_with_kodi);
}
StreamDialogEntry.setEnabledEntries(entries);

View file

@ -17,7 +17,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.preference.PreferenceManager;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
@ -176,11 +175,8 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
StreamDialogEntry.share
));
}
final boolean enableKodiEntry = KoreUtil.isServiceSupportedByKore(item.getServiceId())
&& PreferenceManager.getDefaultSharedPreferences(context)
.getBoolean(context.getString(R.string.show_play_with_kodi_key), false);
if (enableKodiEntry) {
entries.add(StreamDialogEntry.play_on_kodi);
if (KoreUtil.shouldShowPlayWithKodi(context, item)) {
entries.add(StreamDialogEntry.play_with_kodi);
}
StreamDialogEntry.setEnabledEntries(entries);