mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 09:53:55 +01:00
Compare commits
3 Commits
v2.196.0-d
...
v2.196.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd83834788 | ||
|
|
4874853cda | ||
|
|
0756f81547 |
@@ -1,3 +1,11 @@
|
||||
# [2.196.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.8...v2.196.0-dev.9) (2023-10-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Disable precise seeking gesture:** Use better patch name ([88cce59](https://github.com/ReVanced/revanced-patches/commit/88cce592adde46bc2811596772c03d275352be4b))
|
||||
* **YouTube:** Add `Enable old seekbar thumbnails` patch ([e97e0e6](https://github.com/ReVanced/revanced-patches/commit/e97e0e6631f64e12b8d45d8cacbc059d5fc72e0c))
|
||||
|
||||
# [2.196.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.7...v2.196.0-dev.8) (2023-10-25)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 2.196.0-dev.8
|
||||
version = 2.196.0-dev.9
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -15,8 +15,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
|
||||
@Patch(
|
||||
name = "Disable fine scrubbing gesture",
|
||||
description = "Disables gesture that shows the fine scrubbing overlay when swiping up on the seekbar.",
|
||||
name = "Disable precise seeking gesture",
|
||||
description = "Disables the gesture that is used to seek precisely when swiping up on the seekbar.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
@@ -30,20 +30,20 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DisableFineScrubbingGesturePatch : BytecodePatch(
|
||||
object DisablePreciseSeekingGesturePatch : BytecodePatch(
|
||||
setOf(IsSwipingUpFingerprint)
|
||||
) {
|
||||
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/DisableFineScrubbingGesturePatch;->" +
|
||||
"Lapp/revanced/integrations/patches/DisablePreciseSeekingGesturePatch;->" +
|
||||
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_disable_fine_scrubbing_gesture",
|
||||
StringResource("revanced_disable_fine_scrubbing_gesture_title", "Disable fine scrubbing gesture"),
|
||||
StringResource("revanced_disable_fine_scrubbing_gesture_summary_on", "Gesture is disabled"),
|
||||
StringResource("revanced_disable_fine_scrubbing_gesture_summary_off", "Gesture is enabled"),
|
||||
"revanced_disable_precise_seeking_gesture",
|
||||
StringResource("revanced_disable_precise_seeking_gesture_title", "Disable precise seeking gesture"),
|
||||
StringResource("revanced_disable_precise_seeking_gesture_summary_on", "Gesture is disabled"),
|
||||
StringResource("revanced_disable_precise_seeking_gesture_summary_off", "Gesture is enabled"),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
@Patch(
|
||||
name = "Disable fullscreen ambient mode",
|
||||
description = "Disables the ambient mode when in fullscreen.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class, IntegrationsPatch::class],
|
||||
dependencies = [SettingsPatch::class, IntegrationsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube", [
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.seekbar.fingerprints.EnableNewSeekbarThumbnailsFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
|
||||
@Patch(
|
||||
name = "Enable old seekbar thumbnails",
|
||||
description = "Enables the old seekbar thumbnails that appear above the seekbar instead of in fullscreen.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube", [
|
||||
"18.37.36",
|
||||
"18.38.44"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object EnableOldSeekbarThumbnailsPatch : BytecodePatch(
|
||||
setOf(EnableNewSeekbarThumbnailsFingerprint)
|
||||
) {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/EnableOldSeekbarThumbnailsPatch;"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_enable_old_seekbar_thumbnails",
|
||||
StringResource(
|
||||
"revanced_enable_old_seekbar_thumbnails_title",
|
||||
"Enable old seekbar thumbnails"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_enable_old_seekbar_thumbnails_summary_on",
|
||||
"Seekbar thumbnails will appear above the seekbar"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_enable_old_seekbar_thumbnails_summary_off",
|
||||
"Seekbar thumbnails will appear in fullscreen"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
EnableNewSeekbarThumbnailsFingerprint.result?.mutableMethod?.apply {
|
||||
val moveResultIndex = getInstructions().lastIndex - 1
|
||||
|
||||
addInstruction(
|
||||
moveResultIndex,
|
||||
"invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->enableOldSeekbarThumbnails()Z"
|
||||
)
|
||||
} ?: throw EnableNewSeekbarThumbnailsFingerprint.exception
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.util.patch.LiteralValueFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object EnableNewSeekbarThumbnailsFingerprint : LiteralValueFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = emptyList(),
|
||||
literalSupplier = { 45398577 }
|
||||
)
|
||||
Reference in New Issue
Block a user