diff --git a/src/main/kotlin/app/revanced/patches/music/general/emojipicker/patch/HideEmojiPickerPatch.kt b/src/main/kotlin/app/revanced/patches/music/general/emojipicker/patch/HideEmojiPickerPatch.kt new file mode 100644 index 000000000..5320b276a --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/music/general/emojipicker/patch/HideEmojiPickerPatch.kt @@ -0,0 +1,42 @@ +package app.revanced.patches.music.general.emojipicker.patch + +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.music.utils.annotations.MusicCompatibility +import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch +import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch +import app.revanced.util.enum.CategoryType +import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH + +@Patch +@Name("Hide emoji picker") +@Description("Hides emoji picker at the comments box.") +@DependsOn( + [ + LithoFilterPatch::class, + SettingsPatch::class + ] +) +@MusicCompatibility +class HideEmojiPickerPatch : BytecodePatch() { + override fun execute(context: BytecodeContext) { + + SettingsPatch.addMusicPreference( + CategoryType.GENERAL, + "revanced_hide_emoji_picker", + "false" + ) + + LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) + + } + + private companion object { + private const val FILTER_CLASS_DESCRIPTOR = + "$MUSIC_ADS_PATH/EmojiPickerFilter;" + } +} diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml index f63f3ae2d..feaaf7262 100644 --- a/src/main/resources/music/settings/host/values/strings.xml +++ b/src/main/resources/music/settings/host/values/strings.xml @@ -53,6 +53,8 @@ Hide category bar Hides channel guidelines at the top of comments. Hide channel guidelines + Hides emoji picker at the comments box. + Hide emoji picker Hides ads before playing a music. Hide music ads Hide labels in navigation bar.