mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-08 10:34:33 +02:00
add hide-carousel-shelf
patch
This commit is contained in:
parent
420cd86070
commit
3a2d35baae
@ -0,0 +1,35 @@
|
||||
package app.revanced.patches.music.layout.carouselshelf.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.misc.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.misc.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@Name("hide-carousel-shelf")
|
||||
@Description("Hides the carousel shelf from homepage and explorer.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeMusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideCarouselShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(CategoryType.LAYOUT, "revanced_hide_carousel_shelf", "false")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user