Skip to content

Commit

Permalink
fix: Move about preference to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Apr 7, 2024
1 parent 118bb3b commit d6eb706
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ object SettingsPatch :
override fun execute(context: BytecodeContext) {
AddResourcesPatch(this::class)

// Add an about preference to the top.
SettingsResourcePatch += NonInteractivePreference(
key = "revanced_settings_screen_00_about",
summaryKey = null,
tag = "app.revanced.integrations.youtube.settings.preference.ReVancedYouTubeAboutPreference",
selectable = true,
)

PreferenceScreen.MISC.addPreferences(
TextPreference(
key = null,
Expand All @@ -56,14 +64,6 @@ object SettingsPatch :
)
)

// Add about preference.
SettingsResourcePatch += NonInteractivePreference(
key = "revanced_settings_screen_13_about",
summaryKey = null,
tag = "app.revanced.integrations.youtube.settings.preference.ReVancedYouTubeAboutPreference",
selectable = true,
)

SetThemeFingerprint.result?.mutableMethod?.let { setThemeMethod ->
setThemeMethod.implementation!!.instructions.mapIndexedNotNull { i, instruction ->
if (instruction.opcode == Opcode.RETURN_OBJECT) i else null
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/addresources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@
<app id="youtube">
<patch id="misc.settings.SettingsResourcePatch">
<string name="revanced_settings">ReVanced</string>
<string name="revanced_settings_about_links_body">You are using ReVanced Patches version &lt;i>%s&lt;/i></string>
<string name="revanced_settings_about_links_dev_header">Note</string>
<string name="revanced_settings_about_links_dev_body">This version is a pre-release and you may experience unexpected issues</string>
<string name="revanced_settings_about_links_header">Official links</string>
<string name="revanced_pref_import_export_title">Import / Export</string>
<string name="revanced_pref_import_export_summary">Import / Export ReVanced settings</string>
</patch>
<patch id="misc.settings.SettingsPatch">
<string name="revanced_settings_screen_00_about_title">About</string>
<string name="revanced_settings_screen_01_ads_title">Ads</string>
<string name="revanced_settings_screen_02_alt_thumbnails_title">Alternative thumbnails</string>
<string name="revanced_settings_screen_03_feed_title">Feed</string>
Expand All @@ -67,11 +72,6 @@
<string name="revanced_settings_screen_08_swipe_controls_title">Swipe controls</string>
<string name="revanced_settings_screen_11_misc_title">Misc</string>
<string name="revanced_settings_screen_12_video_title">Video</string>
<string name="revanced_settings_screen_13_about_title">About</string>
<string name="revanced_settings_about_links_body">You are using ReVanced Patches version &lt;i>%s&lt;/i></string>
<string name="revanced_settings_about_links_dev_header">Note</string>
<string name="revanced_settings_about_links_dev_body">This version is a pre-release and you may experience unexpected issues</string>
<string name="revanced_settings_about_links_header">Official links</string>
</patch>
<patch id="misc.debugging.DebuggingPatch">
<string name="revanced_debug_screen_title">Debugging</string>
Expand Down

0 comments on commit d6eb706

Please sign in to comment.