mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(music): add hide-emoji-picker
patch
This commit is contained in:
@ -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;"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user