feat(youtube/settings): add reset button to edit preference dialog (#2047)
This commit is contained in:
parent
334948d61e
commit
ede765ae3c
|
@ -23,7 +23,7 @@ internal class TextPreference(
|
||||||
val default: String? = null,
|
val default: String? = null,
|
||||||
val summary: StringResource? = null
|
val summary: StringResource? = null
|
||||||
) : BasePreference(key, title) {
|
) : BasePreference(key, title) {
|
||||||
override val tag: String = "EditTextPreference"
|
override val tag: String = "app.revanced.integrations.settingsmenu.ResettableEditTextPreference"
|
||||||
|
|
||||||
override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element {
|
override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element {
|
||||||
return super.serialize(ownerDocument, resourceCallback).apply {
|
return super.serialize(ownerDocument, resourceCallback).apply {
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ThemeResourcePatch : ResourcePatch {
|
||||||
"revanced_seekbar_color",
|
"revanced_seekbar_color",
|
||||||
StringResource("revanced_seekbar_color_title", "Seekbar color"),
|
StringResource("revanced_seekbar_color_title", "Seekbar color"),
|
||||||
InputType.STRING,
|
InputType.STRING,
|
||||||
"#ffff0000",
|
"#FF0000",
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_seekbar_color_summary",
|
"revanced_seekbar_color_summary",
|
||||||
"The color of the seekbar for the dark theme."
|
"The color of the seekbar for the dark theme."
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="revanced_settings_confirm_user_dialog_title">Do you wish to proceed?</string>
|
<string name="revanced_settings_confirm_user_dialog_title">Do you wish to proceed?</string>
|
||||||
|
<string name="revanced_settings_reset">Reset</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue