Skip to content

Commit

Permalink
feat(YouTube - Toolbar components): Add Hide YouTube Doodles setting
Browse files Browse the repository at this point in the history
  • Loading branch information
anddea committed Oct 15, 2024
1 parent a72e637 commit df0ad50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,12 @@ public static void hideVoiceSearchButton(View view, int visibility) {
}
}

public static void hideYouTubeDoodles(ImageView imageView, Drawable drawable) {
if (!Settings.HIDE_YOUTUBE_DOODLES.get()) {
imageView.setImageDrawable(drawable);
}
}

private static final int settingsDrawableId = ResourceUtils.getDrawableIdentifier("yt_outline_gear_black_24");

public static int getCreateButtonDrawableId(int original) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_SEARCH_TERM_THUMBNAIL = new BooleanSetting("revanced_hide_search_term_thumbnail", FALSE);
public static final BooleanSetting HIDE_IMAGE_SEARCH_BUTTON = new BooleanSetting("revanced_hide_image_search_button", FALSE, true);
public static final BooleanSetting HIDE_VOICE_SEARCH_BUTTON = new BooleanSetting("revanced_hide_voice_search_button", FALSE, true);
public static final BooleanSetting HIDE_YOUTUBE_DOODLES = new BooleanSetting("revanced_hide_youtube_doodles", FALSE, true, "revanced_hide_youtube_doodles_user_dialog_message");
public static final BooleanSetting REPLACE_TOOLBAR_CREATE_BUTTON = new BooleanSetting("revanced_replace_toolbar_create_button", FALSE, true);
public static final BooleanSetting REPLACE_TOOLBAR_CREATE_BUTTON_TYPE = new BooleanSetting("revanced_replace_toolbar_create_button_type", FALSE, true);

Expand Down

0 comments on commit df0ad50

Please sign in to comment.