Skip to content

Commit

Permalink
Only show "mark as watched" context menu entry when watch history is …
Browse files Browse the repository at this point in the history
…enabled
  • Loading branch information
TobiGr committed Aug 22, 2021
1 parent ccc2d89 commit d980f3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,15 @@ class FeedFragment : BaseStateFragment<FeedState>() {
)
)
}
if (item.streamType != StreamType.AUDIO_LIVE_STREAM && item.streamType != StreamType.LIVE_STREAM) {

// show "mark as watched" only when watch history is enabled
val isWatchHistoryEnabled = PreferenceManager
.getDefaultSharedPreferences(context)
.getBoolean(getString(R.string.enable_watch_history_key), false)
if (item.streamType != StreamType.AUDIO_LIVE_STREAM &&
item.streamType != StreamType.LIVE_STREAM &&
isWatchHistoryEnabled
) {
entries.add(
StreamDialogEntry.mark_as_watched
)
Expand Down

0 comments on commit d980f3b

Please sign in to comment.