From d6eb706d77d62c575f3f216d13eea3b78b7a6e99 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 7 Apr 2024 16:32:32 +0400 Subject: [PATCH] fix: Move about preference to the top --- .../youtube/misc/settings/SettingsPatch.kt | 16 ++++++++-------- .../resources/addresources/values/strings.xml | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt index 39ca4f9e00..6f96dcffa0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt @@ -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, @@ -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 diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index f4df0a1b45..c6d77c52fc 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -53,10 +53,15 @@ ReVanced + You are using ReVanced Patches version <i>%s</i> + Note + This version is a pre-release and you may experience unexpected issues + Official links Import / Export Import / Export ReVanced settings + About Ads Alternative thumbnails Feed @@ -67,11 +72,6 @@ Swipe controls Misc Video - About - You are using ReVanced Patches version <i>%s</i> - Note - This version is a pre-release and you may experience unexpected issues - Official links Debugging