mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 09:07:46 +01:00
fix: add missing switch for tablet-mini-player
patch
This commit is contained in:
parent
5fe0e263b4
commit
244a1b2cb9
1 changed files with 12 additions and 1 deletions
|
@ -19,10 +19,13 @@ import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPla
|
|||
import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPlayerOverrideNoContextFingerprint
|
||||
import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPlayerResponseModelSizeCheckFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("tablet-mini-player")
|
||||
@Description("Enables the tablet mini player layout.")
|
||||
@TabletMiniPlayerCompatibility
|
||||
|
@ -34,6 +37,14 @@ class TabletMiniPlayerPatch : BytecodePatch(
|
|||
)
|
||||
) {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(SwitchPreference(
|
||||
"revanced_tablet_miniplayer",
|
||||
StringResource("revanced_tablet_miniplayer_title", "Remove general ads"),
|
||||
false,
|
||||
StringResource("revanced_tablet_miniplayer_summary_on", "Tablet Mini-player is enabled"),
|
||||
StringResource("revanced_tablet_miniplayer_summary_off", "Tablet Mini-player is disabled")
|
||||
))
|
||||
|
||||
// first resolve the fingerprints via the parent fingerprint
|
||||
val miniPlayerClass = MiniPlayerDimensionsCalculatorFingerprint.result!!.classDef
|
||||
|
||||
|
|
Loading…
Reference in a new issue