Address some deprecation warnings
This commit is contained in:
@@ -170,22 +170,22 @@ object DebugFunctions {
|
||||
fun clearSavedSearches() = prefs.savedSearches().set(emptySet())
|
||||
|
||||
fun listAllSources() = sourceManager.getCatalogueSources().joinToString("\n") {
|
||||
"${it.id}: ${it.name} (${it.lang.toUpperCase()})"
|
||||
"${it.id}: ${it.name} (${it.lang.uppercase()})"
|
||||
}
|
||||
|
||||
fun listAllSourcesClassName() = sourceManager.getCatalogueSources().joinToString("\n") {
|
||||
"${it::class.qualifiedName}: ${it.name} (${it.lang.toUpperCase()})"
|
||||
"${it::class.qualifiedName}: ${it.name} (${it.lang.uppercase()})"
|
||||
}
|
||||
|
||||
fun listVisibleSources() = sourceManager.getVisibleCatalogueSources().joinToString("\n") {
|
||||
"${it.id}: ${it.name} (${it.lang.toUpperCase()})"
|
||||
"${it.id}: ${it.name} (${it.lang.uppercase()})"
|
||||
}
|
||||
|
||||
fun listAllHttpSources() = sourceManager.getOnlineSources().joinToString("\n") {
|
||||
"${it.id}: ${it.name} (${it.lang.toUpperCase()})"
|
||||
"${it.id}: ${it.name} (${it.lang.uppercase()})"
|
||||
}
|
||||
fun listVisibleHttpSources() = sourceManager.getVisibleOnlineSources().joinToString("\n") {
|
||||
"${it.id}: ${it.name} (${it.lang.toUpperCase()})"
|
||||
"${it.id}: ${it.name} (${it.lang.uppercase()})"
|
||||
}
|
||||
|
||||
fun convertAllEhentaiGalleriesToExhentai() = convertSources(EH_SOURCE_ID, EXH_SOURCE_ID)
|
||||
|
||||
@@ -31,7 +31,7 @@ class SettingsDebugController : SettingsController() {
|
||||
it.visibility == KVisibility.PUBLIC
|
||||
}.forEach {
|
||||
preference {
|
||||
title = it.name.replace("(.)(\\p{Upper})".toRegex(), "$1 $2").toLowerCase(Locale.getDefault()).capitalize(Locale.getDefault())
|
||||
title = it.name.replace("(.)(\\p{Upper})".toRegex(), "$1 $2").lowercase(Locale.getDefault()).capitalize(Locale.getDefault())
|
||||
isPersistent = false
|
||||
|
||||
onClick {
|
||||
@@ -62,7 +62,7 @@ class SettingsDebugController : SettingsController() {
|
||||
|
||||
DebugToggles.values().forEach {
|
||||
switchPreference {
|
||||
title = it.name.replace('_', ' ').toLowerCase(Locale.getDefault()).capitalize(Locale.getDefault())
|
||||
title = it.name.replace('_', ' ').lowercase(Locale.getDefault()).capitalize(Locale.getDefault())
|
||||
key = it.prefKey
|
||||
defaultValue = it.default
|
||||
summaryOn = if (it.default) "" else MODIFIED_TEXT
|
||||
|
||||
Reference in New Issue
Block a user