address pull request feedback

This commit is contained in:
khimaros 2020-12-30 14:40:21 -08:00
parent 83faf119a9
commit 48a5107296
6 changed files with 17 additions and 24 deletions

View file

@ -17,7 +17,6 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.preference.PreferenceManager;
import com.google.android.material.snackbar.Snackbar;
@ -415,11 +414,8 @@ public class StatisticsPlaylistFragment
StreamDialogEntry.share
));
}
final boolean enableKodiEntry = KoreUtil.isServiceSupportedByKore(infoItem.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, infoItem)) {
entries.add(StreamDialogEntry.play_with_kodi);
}
StreamDialogEntry.setEnabledEntries(entries);

View file

@ -20,7 +20,6 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;
@ -783,11 +782,8 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
StreamDialogEntry.share
));
}
final boolean enableKodiEntry = KoreUtil.isServiceSupportedByKore(infoItem.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, infoItem)) {
entries.add(StreamDialogEntry.play_with_kodi);
}
StreamDialogEntry.setEnabledEntries(entries);