Skip to content

Commit

Permalink
feat: use supplier instead of KClass
Browse files Browse the repository at this point in the history
BREAKING CHANGE: signature of patches was changed
  • Loading branch information
Sculas committed Mar 22, 2022
1 parent 43da313 commit 08af6e5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/main/kotlin/app/revanced/patches/Index.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
)
}

0 comments on commit 08af6e5

Please sign in to comment.