generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
162 changed files
with
497 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
org.gradle.parallel = true | ||
org.gradle.caching = true | ||
kotlin.code.style = official | ||
version = 3.3.0-dev.1 | ||
version = 4.0.0-dev.2 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
src/main/kotlin/app/revanced/patches/shared/settings/preference/DefaultBasePreference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +0,0 @@ | ||
package app.revanced.patches.shared.settings.preference | ||
|
||
import app.revanced.util.resource.BaseResource | ||
import app.revanced.util.resource.StringResource | ||
import org.w3c.dom.Document | ||
|
||
/** | ||
* Base preference class that also has a default value. | ||
* | ||
* @param key The key of the preference. | ||
* @param title The title of the preference. | ||
* @param tag The tag of the preference. | ||
* @param summary The summary of the preference. | ||
* @param default The default value of the preference. | ||
*/ | ||
abstract class DefaultBasePreference<T>( | ||
key: String?, | ||
title: StringResource, | ||
summary: StringResource? = null, | ||
tag: String, | ||
val default: T? = null, | ||
) : BasePreference(key, title, summary, tag) { | ||
|
||
/** | ||
* Serialize preference element to XML. | ||
* Overriding methods should invoke super and operate on its return value. | ||
* @param ownerDocument Target document to create elements from. | ||
* @param resourceCallback Called when a resource has been processed. | ||
* @return The serialized element. | ||
*/ | ||
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) = | ||
super.serialize(ownerDocument, resourceCallback).apply { addDefault(default) } | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.