Skip to content

Commit

Permalink
Update on feature addition: Grey out watched videos.
Browse files Browse the repository at this point in the history
  • Loading branch information
yy-385 committed Oct 20, 2024
1 parent 33e5501 commit 5f29d6e
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.schabi.newpipe.info_list.holder;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.ViewGroup;
Expand Down Expand Up @@ -84,16 +82,6 @@ public void updateFromItem(final InfoItem infoItem,
state = historyRecordManager.loadStreamState(infoItem).blockingGet()[0];
}

final Context context = itemView.getContext();
final int nightModeFlags = context.getResources().getConfiguration().uiMode
& Configuration.UI_MODE_NIGHT_MASK;

if (nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
itemView.setBackgroundColor(Color.BLACK); // Dark theme
} else {
itemView.setBackgroundColor(Color.WHITE); // Light theme
}

if (state != null && item.getDuration() > 0) {
final int duration = (int) TimeUnit.MILLISECONDS.toSeconds(item.getDuration());
final int progress = (int) TimeUnit.MILLISECONDS.
Expand Down

0 comments on commit 5f29d6e

Please sign in to comment.