mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
re-add enable-old-layout
patch
This commit is contained in:
@ -9,13 +9,18 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
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.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.oldlayout.fingerprints.OldLayoutFingerprint
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("enable-old-layout")
|
||||
@Description("Spoof the YouTube client version to use the old layout.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.1")
|
||||
class OldLayoutPatch : BytecodePatch(
|
||||
@ -39,6 +44,17 @@ class OldLayoutPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return OldLayoutFingerprint.toErrorResult()
|
||||
|
||||
/*
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"SETTINGS: ENABLE_OLD_LAYOUT"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("enable-old-layout")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -12,7 +12,6 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.options.PatchOptions
|
||||
import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.oldlayout.patch.OldLayoutPatch
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsBytecodePatch
|
||||
import app.revanced.util.resources.ResourceHelper.addPreference
|
||||
@ -28,7 +27,6 @@ import org.w3c.dom.Element
|
||||
@DependsOn(
|
||||
[
|
||||
IntegrationsPatch::class,
|
||||
OldLayoutPatch::class,
|
||||
PatchOptions::class,
|
||||
SharedResourcdIdPatch::class,
|
||||
SettingsBytecodePatch::class
|
||||
|
Reference in New Issue
Block a user