Compare commits

..

2 Commits

Author SHA1 Message Date
semantic-release-bot
c0f11e7848 chore(release): 2.182.1-dev.2 [skip ci]
## [2.182.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.182.1-dev.1...v2.182.1-dev.2) (2023-07-09)

### Bug Fixes

* **youtube/custom-video-speed:** don not implicitly depend on `old-video-quality-menu` patch ([9b2d89c](9b2d89cda5))
2023-07-09 14:18:55 +00:00
oSumAtrIX
9b2d89cda5 fix(youtube/custom-video-speed): don not implicitly depend on old-video-quality-menu patch 2023-07-09 16:15:55 +02:00
6 changed files with 34 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
## [2.182.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.182.1-dev.1...v2.182.1-dev.2) (2023-07-09)
### Bug Fixes
* **youtube/custom-video-speed:** don not implicitly depend on `old-video-quality-menu` patch ([acfda46](https://github.com/revanced/revanced-patches/commit/acfda46bce2558df18a6fa562008e058df5ad31e))
## [2.182.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.182.1-dev.1) (2023-07-08)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.182.1-dev.1
version = 2.182.1-dev.2

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patches.youtube.video.videoqualitymenu.patch.OldVideoQualityMenuResourcePatch
import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookResourcePatch
import app.revanced.util.patch.LiteralValueFingerprint
import org.jf.dexlib2.AccessFlags
@@ -9,5 +9,5 @@ object CreateBottomSheetFingerprint : LiteralValueFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("L"),
returnType = "Landroid/widget/LinearLayout;",
literal = OldVideoQualityMenuResourcePatch.bottomSheetMargins
literal = BottomSheetHookResourcePatch.bottomSheetMargins
)

View File

@@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints.CreateBot
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@DependsOn([IntegrationsPatch::class])
@DependsOn([IntegrationsPatch::class, BottomSheetHookResourcePatch::class])
class BottomSheetHookPatch : BytecodePatch(
listOf(CreateBottomSheetFingerprint)
) {

View File

@@ -0,0 +1,23 @@
package app.revanced.patches.youtube.misc.bottomsheet.hook.patch
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
@DependsOn([ResourceMappingPatch::class])
class BottomSheetHookResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
bottomSheetMargins = ResourceMappingPatch.resourceMappings.find { it.name == "bottomSheetMargins" }?.id
?: return PatchResultError("Could not find resource")
return PatchResultSuccess()
}
internal companion object {
var bottomSheetMargins = -1L
}
}

View File

@@ -29,14 +29,10 @@ class OldVideoQualityMenuResourcePatch : ResourcePatch {
// Used for the old type of the video quality menu.
videoQualityBottomSheetListFragmentTitle = findResource("video_quality_bottom_sheet_list_fragment_title")
// Used for the new type of the video quality menu.
bottomSheetMargins = findResource("bottom_sheet_margins")
return PatchResultSuccess()
}
internal companion object {
var videoQualityBottomSheetListFragmentTitle = -1L
var bottomSheetMargins = -1L
}
}