feat: use supplier instead of KClass

BREAKING CHANGE: signature of patches was changed
This commit is contained in:
Lucaskyy 2022-03-22 22:24:56 +01:00
parent 43da3130e9
commit 08af6e54af
No known key found for this signature in database
GPG Key ID: 1530BFF96D1EEB89

View File

@ -4,7 +4,6 @@ import app.revanced.patcher.patch.Patch
import app.revanced.patches.ad.VideoAds
import app.revanced.patches.interaction.EnableSeekbarTapping
import app.revanced.patches.layout.*
import kotlin.reflect.KClass
/**
* Index contains all the patches and should be imported when using this library.
@ -15,13 +14,13 @@ object Index {
* Array of patches.
* New patches should be added to the array.
*/
val patches: Array<KClass<out Patch>> = arrayOf(
VideoAds::class,
MinimizedPlayback::class,
CreateButtonRemover::class,
HideReels::class,
HideSuggestions::class,
OldQualityLayout::class,
EnableSeekbarTapping::class
val patches: Array<() -> Patch> = arrayOf(
::VideoAds,
::MinimizedPlayback,
::CreateButtonRemover,
::HideReels,
::HideSuggestions,
::OldQualityLayout,
::EnableSeekbarTapping
)
}