fix(Twitch): Resolve setting menu crashes (#4025)

This commit is contained in:
LisoUseInAIKyrios
2024-11-30 12:53:08 +04:00
committed by GitHub
parent 414e1dac33
commit 62df5965d7
5 changed files with 87 additions and 74 deletions

View File

@ -11,6 +11,7 @@ import app.revanced.patches.all.misc.resources.addResources
import app.revanced.patches.all.misc.resources.addResourcesPatch
import app.revanced.patches.shared.misc.settings.preference.BasePreference
import app.revanced.patches.shared.misc.settings.preference.BasePreferenceScreen
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
import app.revanced.patches.shared.misc.settings.preference.PreferenceCategory
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
import app.revanced.patches.shared.misc.settings.settingsPatch
@ -58,6 +59,12 @@ val settingsPatch = bytecodePatch(
execute {
addResources("twitch", "misc.settings.settingsPatch")
preferences += NonInteractivePreference(
key = "revanced_about",
tag = "app.revanced.extension.shared.settings.preference.ReVancedAboutPreference",
selectable = true,
)
PreferenceScreen.MISC.OTHER.addPreferences(
// The debug setting is shared across multiple apps and the key must be the same.
// But the title and summary must be different, otherwise when the strings file is flattened

View File

@ -1269,6 +1269,8 @@ This is because Crowdin requires temporarily flattening this file and removing t
</patch>
<patch id="misc.settings.settingsPatch">
<string name="revanced_settings">ReVanced Settings</string>
<string name="revanced_about_title">About</string>
<string name="revanced_about_summary">About ReVanced</string>
<string name="revanced_ads_screen_title">Ads</string>
<string name="revanced_ads_screen_summary">Ad blocking settings</string>
<string name="revanced_chat_screen_title">Chat</string>