mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-20 16:27:17 +02:00
feat(YouTube): change patch name Disable shorts on startup
to Disable resuming shorts on startup
This commit is contained in:
parent
eed9d58da8
commit
dec9ae8f7d
@ -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")
|
||||
|
||||
}
|
||||
}
|
@ -139,13 +139,14 @@ Note: This feature hasn't been tested."</string>
|
||||
<string name="revanced_disable_landscape_mode_title">Disable landscape mode</string>
|
||||
<string name="revanced_disable_quic_protocol_summary">"Disable CronetEngine's QUIC protocol."</string>
|
||||
<string name="revanced_disable_quic_protocol_title">Disable QUIC protocol</string>
|
||||
<string name="revanced_disable_resuming_shorts_player_summary_off">Shorts player will resume on app startup</string>
|
||||
<string name="revanced_disable_resuming_shorts_player_summary_on">Shorts player will not resume on app startup</string>
|
||||
<string name="revanced_disable_resuming_shorts_player_title">Disable resuming Shorts player</string>
|
||||
|
||||
<string name="revanced_disable_speed_overlay_summary">"Disable 'Playing at 2x speed' while holding down.
|
||||
|
||||
Note: Disabling the speed overlay restores the 'Slide to seek' behavior of the old layout."</string>
|
||||
<string name="revanced_disable_speed_overlay_title">Disable speed overlay</string>
|
||||
<string name="revanced_disable_startup_shorts_player_summary_off">Shorts player is enabled at app startup.</string>
|
||||
<string name="revanced_disable_startup_shorts_player_summary_on">Shorts player is disabled at app startup.</string>
|
||||
<string name="revanced_disable_startup_shorts_player_title">Disable shorts player at app startup</string>
|
||||
<string name="revanced_disable_update_screen_summary">Disables the \"Update your app\" screen that appears when using an outdated client.</string>
|
||||
<string name="revanced_disable_update_screen_title">Disable update screen</string>
|
||||
<string name="revanced_double_back_timeout_summary">The amount of seconds the double press back to exit.</string>
|
||||
|
@ -508,7 +508,7 @@
|
||||
<Preference android:title="Hide time stamp" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_shorts" />
|
||||
<Preference android:title="Disable shorts on startup" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="Disable resuming shorts on startup" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="Hide shorts components" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="Shorts outline button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
|
||||
@ -686,8 +686,8 @@
|
||||
<!-- SETTINGS: SHORTS_PLAYER_PARENT
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_shorts_player_title" />SETTINGS: SHORTS_PLAYER_PARENT -->
|
||||
|
||||
<!-- SETTINGS: DISABLE_STARTUP_SHORTS_PLAYER
|
||||
<SwitchPreference android:title="@string/revanced_disable_startup_shorts_player_title" android:key="revanced_disable_startup_shorts_player" android:defaultValue="true" android:summaryOn="@string/revanced_disable_startup_shorts_player_summary_on" android:summaryOff="@string/revanced_disable_startup_shorts_player_summary_off" />SETTINGS: DISABLE_STARTUP_SHORTS_PLAYER -->
|
||||
<!-- SETTINGS: DISABLE_RESUMING_SHORTS_PLAYER
|
||||
<SwitchPreference android:title="@string/revanced_disable_resuming_shorts_player_title" android:key="revanced_disable_resuming_shorts_player" android:defaultValue="true" android:summaryOn="@string/revanced_disable_resuming_shorts_player_summary_on" android:summaryOff="@string/revanced_disable_resuming_shorts_player_summary_off" />SETTINGS: DISABLE_RESUMING_SHORTS_PLAYER -->
|
||||
|
||||
<!-- SETTINGS: HIDE_SHORTS_COMPONENTS
|
||||
<SwitchPreference android:title="@string/revanced_hide_shorts_player_comments_button_title" android:key="revanced_hide_shorts_player_comments_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_shorts_player_comments_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_player_comments_button_summary_off" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user