mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-25 14:21:01 +00:00
feat: Added anime clear progress (#531)
* feat: Added anime clear progress * more stuff added
This commit is contained in:
@@ -235,10 +235,18 @@ object PrefManager {
|
||||
apply()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all SharedPreferences entries with keys starting with the specified prefix.
|
||||
*
|
||||
* @param prefix The prefix to filter keys.
|
||||
* @return A map containing key-value pairs that match the prefix.
|
||||
*/
|
||||
fun getAllCustomValsForMedia(prefix: String): Map<String, Any?> {
|
||||
val prefs = irrelevantPreferences ?: return emptyMap()
|
||||
val allEntries = mutableMapOf<String, Any?>()
|
||||
|
||||
irrelevantPreferences?.all?.forEach { (key, value) ->
|
||||
prefs.all.forEach { (key, value) ->
|
||||
if (key.startsWith(prefix)) {
|
||||
allEntries[key] = value
|
||||
}
|
||||
@@ -249,6 +257,7 @@ object PrefManager {
|
||||
|
||||
|
||||
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T> getLiveVal(prefName: PrefName, default: T): SharedPreferenceLiveData<T> {
|
||||
val pref = getPrefLocation(prefName.data.prefLocation)
|
||||
|
||||
Reference in New Issue
Block a user