Enable Mark as Watched in all the other playlist fragments.
This commit is contained in:
parent
512427c2d5
commit
dfe72e0db1
5 changed files with 59 additions and 13 deletions
|
|
@ -378,6 +378,19 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
|
|||
if (KoreUtils.shouldShowPlayWithKodi(context, item.getServiceId())) {
|
||||
entries.add(StreamDialogEntry.play_with_kodi);
|
||||
}
|
||||
|
||||
// show "mark as watched" only when watch history is enabled
|
||||
final boolean isWatchHistoryEnabled = PreferenceManager
|
||||
.getDefaultSharedPreferences(context)
|
||||
.getBoolean(getString(R.string.enable_watch_history_key), false);
|
||||
if (item.getStreamType() != StreamType.AUDIO_LIVE_STREAM
|
||||
&& item.getStreamType() != StreamType.LIVE_STREAM
|
||||
&& isWatchHistoryEnabled
|
||||
) {
|
||||
entries.add(
|
||||
StreamDialogEntry.mark_as_watched
|
||||
);
|
||||
}
|
||||
if (!isNullOrEmpty(item.getUploaderUrl())) {
|
||||
entries.add(StreamDialogEntry.show_channel_details);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import android.view.ViewGroup;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
|
||||
import org.reactivestreams.Subscriber;
|
||||
|
|
@ -176,6 +177,18 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
|
|||
entries.add(StreamDialogEntry.play_with_kodi);
|
||||
}
|
||||
|
||||
// show "mark as watched" only when watch history is enabled
|
||||
final boolean isWatchHistoryEnabled = PreferenceManager
|
||||
.getDefaultSharedPreferences(context)
|
||||
.getBoolean(getString(R.string.enable_watch_history_key), false);
|
||||
if (item.getStreamType() != StreamType.AUDIO_LIVE_STREAM
|
||||
&& item.getStreamType() != StreamType.LIVE_STREAM
|
||||
&& isWatchHistoryEnabled
|
||||
) {
|
||||
entries.add(
|
||||
StreamDialogEntry.mark_as_watched
|
||||
);
|
||||
}
|
||||
if (!isNullOrEmpty(item.getUploaderUrl())) {
|
||||
entries.add(StreamDialogEntry.show_channel_details);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue