From 16a918a74c31c5d0aea70dba9b33da5e6e31f70c Mon Sep 17 00:00:00 2001 From: inotia00 Date: Tue, 11 Jul 2023 21:36:00 +0900 Subject: [PATCH] feat(youtube): remove `hide-live-chat-button` patch (location of the live chat button has been moved even in the old layout) --- .../patch/HideLiveChatButtonPatch.kt | 44 ------------------- .../youtube/settings/values-v21/strings.xml | 4 -- .../youtube/settings/xml/revanced_prefs.xml | 4 -- 3 files changed, 52 deletions(-) delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/player/livechatbutton/patch/HideLiveChatButtonPatch.kt diff --git a/src/main/kotlin/app/revanced/patches/youtube/player/livechatbutton/patch/HideLiveChatButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/player/livechatbutton/patch/HideLiveChatButtonPatch.kt deleted file mode 100644 index cbaae5f9a..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/player/livechatbutton/patch/HideLiveChatButtonPatch.kt +++ /dev/null @@ -1,44 +0,0 @@ -package app.revanced.patches.youtube.player.livechatbutton.patch - -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Version -import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchResult -import app.revanced.patcher.patch.PatchResultSuccess -import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility -import app.revanced.patches.youtube.utils.playerbutton.patch.PlayerButtonHookPatch -import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch - -@Patch -@Name("hide-live-chat-button") -@Description("Hides the live chat button in the video player (for old layout).") -@DependsOn( - [ - PlayerButtonHookPatch::class, - SettingsPatch::class - ] -) -@YouTubeCompatibility -@Version("0.0.1") -class HideLiveChatButtonPatch : ResourcePatch { - override fun execute(context: ResourceContext): PatchResult { - - /** - * Add settings - */ - SettingsPatch.addPreference( - arrayOf( - "PREFERENCE: PLAYER_SETTINGS", - "SETTINGS: HIDE_LIVE_CHATS_BUTTON" - ) - ) - - SettingsPatch.updatePatchStatus("hide-live-chat-button") - - return PatchResultSuccess() - } -} \ No newline at end of file diff --git a/src/main/resources/youtube/settings/values-v21/strings.xml b/src/main/resources/youtube/settings/values-v21/strings.xml index a4cfe3591..e85009b27 100644 --- a/src/main/resources/youtube/settings/values-v21/strings.xml +++ b/src/main/resources/youtube/settings/values-v21/strings.xml @@ -16,10 +16,6 @@ @string/revanced_hide_button_thanks_summary_on @string/revanced_hide_button_thanks_title - @string/revanced_hide_button_live_chat_summary_off - @string/revanced_hide_button_live_chat_summary_on - @string/revanced_hide_button_live_chat_title - @string/revanced_hide_button_dislike_summary_off @string/revanced_hide_button_dislike_summary_on @string/revanced_hide_button_dislike_title diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index f0d87a1b4..e4ec9ca61 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -347,7 +347,6 @@ - @@ -465,9 +464,6 @@ - -