feat(youtube): import / export of revanced settings (#2077)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
committed by
GitHub
co-authored by
oSumAtrIX
parent
0555cdc54f
commit
5ff3215132
+3
-3
@@ -20,7 +20,6 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
|
||||
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.twitch.misc.settings.annotations.SettingsCompatibility
|
||||
import app.revanced.patches.twitch.misc.settings.components.CustomPreferenceCategory
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsOnClickFingerprint
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsUpdatedFingerprint
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsActivityOnCreateFingerprint
|
||||
@@ -183,10 +182,11 @@ class SettingsPatch : BytecodePatch(
|
||||
internal inner class CustomCategory(key: String, title: String) : Screen.Category(key, title) {
|
||||
/* For Twitch, we need to load our CustomPreferenceCategory class instead of the default one. */
|
||||
override fun transform(): PreferenceCategory {
|
||||
return CustomPreferenceCategory(
|
||||
return PreferenceCategory(
|
||||
key,
|
||||
StringResource("${key}_title", title),
|
||||
preferences.sortedBy { it.title.value }
|
||||
preferences.sortedBy { it.title.value },
|
||||
"app.revanced.twitch.settingsmenu.preference.CustomPreferenceCategory"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package app.revanced.patches.twitch.misc.settings.components
|
||||
|
||||
import app.revanced.patches.shared.settings.preference.BasePreference
|
||||
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
|
||||
/**
|
||||
* Customized preference category for Twitch.
|
||||
*
|
||||
* @param key The key of the preference.
|
||||
* @param title The title of the preference.
|
||||
* @param preferences Child preferences of this category.
|
||||
*/
|
||||
internal open class CustomPreferenceCategory(
|
||||
key: String,
|
||||
title: StringResource,
|
||||
preferences: List<BasePreference>
|
||||
) : PreferenceCategory(key, title, preferences) {
|
||||
override val tag: String = "app.revanced.twitch.settingsmenu.preference.CustomPreferenceCategory"
|
||||
}
|
||||
Reference in New Issue
Block a user