feat(youtube/custom-video-buffer): replace patch with removal notice (#1718)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
LisoUseInAIKyrios
2023-03-14 15:08:44 +01:00
committed by oSumAtrIX
co-authored by oSumAtrIX
parent 3c4956c05a
commit 9ffcb97a90
7 changed files with 36 additions and 230 deletions
@@ -0,0 +1,26 @@
package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.preference.addSummary
import org.w3c.dom.Document
import org.w3c.dom.Element
/**
* A simple static title and summary that is not backed by any preference key/value,
* and cannot be changed by or interacted with by the user,
*/
internal class NonInteractivePreference(
title: StringResource,
val summary: StringResource,
) : BasePreference("", title) {
override val tag: String = "Preference"
override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element {
return super.serialize(ownerDocument, resourceCallback).apply {
addSummary(summary.also { resourceCallback?.invoke(it)
setAttribute("android:selectable", false.toString())
})
}
}
}