mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-28 12:50:19 +02:00
feat(YouTube): separate the Hide channel profile components
patch from Hide layout components
patch
This commit is contained in:
parent
35988a5500
commit
3993128405
@ -0,0 +1,63 @@
|
||||
package app.revanced.patches.youtube.general.descriptions
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.youtube.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide channel profile components",
|
||||
description = "Hides channel profile components.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube",
|
||||
[
|
||||
"18.25.40",
|
||||
"18.27.36",
|
||||
"18.29.38",
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39",
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34",
|
||||
"18.41.39",
|
||||
"18.42.41",
|
||||
"18.43.45",
|
||||
"18.44.41",
|
||||
"18.45.38"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ChannelProfileComponentsPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
LithoFilterPatch.addFilter("$COMPONENTS_PATH/ChannelProfileFilter;")
|
||||
|
||||
/**
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"PREFERENCE: GENERAL_SETTINGS",
|
||||
"SETTINGS: HIDE_CHANNEL_PROFILE_COMPONENTS"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("Hide channel profile components")
|
||||
|
||||
}
|
||||
}
|
@ -45,7 +45,6 @@ import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
@Suppress("unused")
|
||||
object LayoutComponentsPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
LithoFilterPatch.addFilter("$COMPONENTS_PATH/BrowseStoreButtonFilter;")
|
||||
LithoFilterPatch.addFilter("$COMPONENTS_PATH/CommunityPostFilter;")
|
||||
LithoFilterPatch.addFilter("$COMPONENTS_PATH/LayoutComponentsFilter;")
|
||||
LithoFilterPatch.addFilter("$COMPONENTS_PATH/LayoutComponentsUniversalFilter;")
|
||||
|
@ -228,9 +228,6 @@
|
||||
<SwitchPreference android:title="@string/revanced_custom_filter_title" android:key="revanced_custom_filter" android:defaultValue="false" android:summaryOn="@string/revanced_custom_filter_summary_on" android:summaryOff="@string/revanced_custom_filter_summary_off" />
|
||||
<app.revanced.integrations.settingsmenu.ResettableEditTextPreference android:title="@string/revanced_custom_filter_strings_title" android:key="revanced_custom_filter_strings" android:summary="@string/revanced_custom_filter_strings_summary" android:defaultValue="" android:inputType="textMultiLine" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_album_card_title" android:key="revanced_hide_album_card" android:defaultValue="true" android:summaryOn="@string/revanced_hide_album_card_summary_on" android:summaryOff="@string/revanced_hide_album_card_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_browse_store_button_title" android:key="revanced_hide_browse_store_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_browse_store_button_summary_on" android:summaryOff="@string/revanced_hide_browse_store_button_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_channel_member_shelf_title" android:key="revanced_hide_channel_member_shelf" android:defaultValue="true" android:summaryOn="@string/revanced_hide_channel_member_shelf_summary_on" android:summaryOff="@string/revanced_hide_channel_member_shelf_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_channel_profile_links_title" android:key="revanced_hide_channel_profile_links" android:defaultValue="true" android:summaryOn="@string/revanced_hide_channel_profile_links_summary_on" android:summaryOff="@string/revanced_hide_channel_profile_links_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_chips_shelf_title" android:key="revanced_hide_chips_shelf" android:defaultValue="true" android:summaryOn="@string/revanced_hide_chips_shelf_on" android:summaryOff="@string/revanced_hide_chips_shelf_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_community_posts_home_title" android:key="revanced_hide_community_posts_home" android:defaultValue="true" android:summaryOn="@string/revanced_hide_community_posts_home_summary_on" android:summaryOff="@string/revanced_hide_community_posts_home_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_community_posts_subscriptions_title" android:key="revanced_hide_community_posts_subscriptions" android:defaultValue="false" android:summaryOn="@string/revanced_hide_community_posts_subscriptions_summary_on" android:summaryOff="@string/revanced_hide_community_posts_subscriptions_summary_off" />
|
||||
@ -249,6 +246,12 @@
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_experimental_flag" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_video_with_low_view_title" android:key="revanced_hide_video_with_low_view" android:defaultValue="false" android:summary="@string/revanced_hide_video_with_low_view_summary" />SETTINGS: HIDE_LAYOUT_COMPONENTS -->
|
||||
|
||||
<!-- SETTINGS: HIDE_CHANNEL_PROFILE_COMPONENTS
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_channel_profile_title" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_browse_store_button_title" android:key="revanced_hide_browse_store_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_browse_store_button_summary_on" android:summaryOff="@string/revanced_hide_browse_store_button_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_channel_member_shelf_title" android:key="revanced_hide_channel_member_shelf" android:defaultValue="true" android:summaryOn="@string/revanced_hide_channel_member_shelf_summary_on" android:summaryOff="@string/revanced_hide_channel_member_shelf_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_channel_profile_links_title" android:key="revanced_hide_channel_profile_links" android:defaultValue="true" android:summaryOn="@string/revanced_hide_channel_profile_links_summary_on" android:summaryOff="@string/revanced_hide_channel_profile_links_summary_off" />SETTINGS: HIDE_CHANNEL_PROFILE_COMPONENTS -->
|
||||
|
||||
<!-- SETTINGS: HIDE_DESCRIPTION_COMPONENTS
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_description_title" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_chapters_title" android:key="revanced_hide_chapters" android:defaultValue="false" android:summaryOn="@string/revanced_hide_chapters_summary_on" android:summaryOff="@string/revanced_hide_chapters_summary_off" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user