feat:added way to clear saved manga progress (#522)

This commit is contained in:
Ankit Grai
2024-11-12 22:49:03 +05:30
committed by GitHub
parent 5c1c639f53
commit a993935433
2 changed files with 35 additions and 0 deletions

View File

@@ -235,6 +235,19 @@ object PrefManager {
apply()
}
}
fun getAllCustomValsForMedia(prefix: String): Map<String, Any?> {
val allEntries = mutableMapOf<String, Any?>()
irrelevantPreferences?.all?.forEach { (key, value) ->
if (key.startsWith(prefix)) {
allEntries[key] = value
}
}
return allEntries
}
@Suppress("UNCHECKED_CAST")
fun <T> getLiveVal(prefName: PrefName, default: T): SharedPreferenceLiveData<T> {