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 85bfa4ca91
commit 78390a8bca
5 changed files with 87 additions and 74 deletions
@@ -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