mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-10 22:34:33 -05:00
Switch to a new Ktlint Formatter (#705)
* Switch to new Ktlint plugin * Add ktlintCheck to PR builds * Run formatter * Put ktlint version in libs toml * Fix lint * Use Zip4Java from libs.toml
This commit is contained in:
@@ -46,7 +46,7 @@ object Source {
|
||||
catalogueSource.supportsLatest,
|
||||
catalogueSource is ConfigurableSource,
|
||||
it[SourceTable.isNsfw],
|
||||
catalogueSource.toString()
|
||||
catalogueSource.toString(),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -63,12 +63,12 @@ object Source {
|
||||
source[SourceTable.name],
|
||||
source[SourceTable.lang],
|
||||
getExtensionIconUrl(
|
||||
extension[ExtensionTable.apkName]
|
||||
extension[ExtensionTable.apkName],
|
||||
),
|
||||
catalogueSource.supportsLatest,
|
||||
catalogueSource is ConfigurableSource,
|
||||
source[SourceTable.isNsfw],
|
||||
catalogueSource.toString()
|
||||
catalogueSource.toString(),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ object Source {
|
||||
*/
|
||||
data class PreferenceObject(
|
||||
val type: String,
|
||||
val props: Any
|
||||
val props: Any,
|
||||
)
|
||||
|
||||
var preferenceScreenMap: MutableMap<Long, PreferenceScreen> = mutableMapOf()
|
||||
@@ -119,7 +119,7 @@ object Source {
|
||||
|
||||
data class SourcePreferenceChange(
|
||||
val position: Int,
|
||||
val value: String
|
||||
val value: String,
|
||||
)
|
||||
|
||||
private val jsonMapper by DI.global.instance<JsonMapper>()
|
||||
@@ -137,7 +137,7 @@ object Source {
|
||||
"Set<String>" -> jsonMapper.fromJsonString(value, List::class.java as Class<List<String>>).toSet()
|
||||
else -> throw RuntimeException("Unsupported type conversion")
|
||||
}
|
||||
}
|
||||
},
|
||||
) {
|
||||
val screen = preferenceScreenMap[sourceId]!!
|
||||
val pref = screen.preferences[position]
|
||||
|
||||
Reference in New Issue
Block a user