diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/startupshortsreset/DisableShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/startupshortsreset/DisableResumingShortsOnStartupPatch.kt similarity index 90% rename from src/main/kotlin/app/revanced/patches/youtube/shorts/startupshortsreset/DisableShortsOnStartupPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/shorts/startupshortsreset/DisableResumingShortsOnStartupPatch.kt index d900f05bb..9d772f2c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/startupshortsreset/DisableShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/shorts/startupshortsreset/DisableResumingShortsOnStartupPatch.kt @@ -19,7 +19,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction @Patch( - name = "Disable shorts on startup", + name = "Disable resuming shorts on startup", description = "Adds an option to disable the Shorts player from resuming on app startup when Shorts were last being watched.", dependencies = [SettingsPatch::class], compatiblePackages = [ @@ -53,7 +53,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction ] ) @Suppress("unused") -object DisableShortsOnStartupPatch : BytecodePatch( +object DisableResumingShortsOnStartupPatch : BytecodePatch( setOf(UserWasInShortsFingerprint) ) { override fun execute(context: BytecodeContext) { @@ -72,11 +72,11 @@ object DisableShortsOnStartupPatch : BytecodePatch( addInstructionsWithLabels( targetIndex + 1, """ - invoke-static { }, $SHORTS->disableStartupShortsPlayer()Z + invoke-static {}, $SHORTS->disableResumingStartupShortsPlayer()Z move-result v${replaceInstruction.registerA} - if-eqz v${replaceInstruction.registerA}, :show_startup_shorts_player + if-eqz v${replaceInstruction.registerA}, :show return-void - :show_startup_shorts_player + :show iget-object v${replaceInstruction.registerA}, v${replaceInstruction.registerB}, $replaceReference """ ) @@ -91,11 +91,11 @@ object DisableShortsOnStartupPatch : BytecodePatch( arrayOf( "PREFERENCE: SHORTS_SETTINGS", "SETTINGS: SHORTS_PLAYER_PARENT", - "SETTINGS: DISABLE_STARTUP_SHORTS_PLAYER" + "SETTINGS: DISABLE_RESUMING_SHORTS_PLAYER" ) ) - SettingsPatch.updatePatchStatus("Disable shorts on startup") + SettingsPatch.updatePatchStatus("Disable resuming shorts on startup") } } diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index 45d63d846..e2c4335cf 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -139,13 +139,14 @@ Note: This feature hasn't been tested." Disable landscape mode "Disable CronetEngine's QUIC protocol." Disable QUIC protocol + Shorts player will resume on app startup + Shorts player will not resume on app startup + Disable resuming Shorts player + "Disable 'Playing at 2x speed' while holding down. Note: Disabling the speed overlay restores the 'Slide to seek' behavior of the old layout." Disable speed overlay - Shorts player is enabled at app startup. - Shorts player is disabled at app startup. - Disable shorts player at app startup Disables the \"Update your app\" screen that appears when using an outdated client. Disable update screen The amount of seconds the double press back to exit. diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 8c2da9f80..743cfb625 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -508,7 +508,7 @@ - + @@ -686,8 +686,8 @@ - +