Skip to content

Commit 47cd714

Browse files
feat(YouTube - Hide layout components): Add "Hide Featured channels section" setting (#1567)
1 parent 8608270 commit 47cd714

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

extensions/youtube/src/main/java/app/morphe/extension/youtube/patches/components/DescriptionComponentsFilter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public DescriptionComponentsFilter() {
4242
);
4343

4444
featuredSectionGroupList.addAll(
45+
new ByteArrayFilterGroup(
46+
Settings.HIDE_FEATURED_CHANNELS_SECTION,
47+
"structured_description_channel_lockup"
48+
),
4549
new ByteArrayFilterGroup(
4650
Settings.HIDE_FEATURED_LINKS_SECTION,
4751
"media_lockup"

extensions/youtube/src/main/java/app/morphe/extension/youtube/settings/Settings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ public class Settings extends SharedYouTubeSettings {
291291
public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("morphe_hide_how_this_was_made_section", FALSE);
292292
public static final BooleanSetting HIDE_HYPE_POINTS = new BooleanSetting("morphe_hide_hype_points", FALSE);
293293
public static final BooleanSetting HIDE_INFO_CARDS_SECTION = new BooleanSetting("morphe_hide_info_cards_section", FALSE);
294+
public static final BooleanSetting HIDE_FEATURED_CHANNELS_SECTION = new BooleanSetting("morphe_hide_featured_channels_section", FALSE, parentNot(HIDE_INFO_CARDS_SECTION));
294295
public static final BooleanSetting HIDE_FEATURED_LINKS_SECTION = new BooleanSetting("morphe_hide_featured_links_section", FALSE, parentNot(HIDE_INFO_CARDS_SECTION));
295296
public static final BooleanSetting HIDE_FEATURED_VIDEOS_SECTION = new BooleanSetting("morphe_hide_featured_videos_section", FALSE, parentNot(HIDE_INFO_CARDS_SECTION));
296297
public static final BooleanSetting HIDE_SUBSCRIBE_BUTTON = new BooleanSetting("morphe_hide_subscribe_button", FALSE, parentNot(HIDE_INFO_CARDS_SECTION));

patches/src/main/kotlin/app/morphe/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
113113
SwitchPreference("morphe_hide_explore_section"),
114114
SwitchPreference("morphe_hide_explore_course_section", summaryKey = null),
115115
SwitchPreference("morphe_hide_explore_podcast_section", summaryKey = null),
116+
SwitchPreference("morphe_hide_featured_channels_section", summaryKey = null),
116117
SwitchPreference("morphe_hide_featured_links_section", summaryKey = null),
117118
SwitchPreference("morphe_hide_featured_places_section", summaryKey = null),
118119
SwitchPreference("morphe_hide_featured_videos_section", summaryKey = null),

patches/src/main/resources/addresources/values/youtube/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Showing YouTube Doodles may prevent custom headers from displaying."</string>
154154
<string name="morphe_hide_explore_section_summary">Hides the Explore this course and Explore the podcast sections</string>
155155
<string name="morphe_hide_explore_course_section_title">Hide \'Explore this course\' section</string>
156156
<string name="morphe_hide_explore_podcast_section_title">Hide \'Explore the podcast\' section</string>
157+
<string name="morphe_hide_featured_channels_section_title">Hide Featured channels section</string>
157158
<string name="morphe_hide_featured_links_section_title">Hide Featured links section</string>
158159
<string name="morphe_hide_featured_places_section_title">Hide \'Featured places\' section</string>
159160
<string name="morphe_hide_featured_videos_section_title">Hide Featured videos section</string>

0 commit comments

Comments
 (0)