mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Automatic Lint
This commit is contained in:
@@ -22,8 +22,8 @@ class FlowConverterFactory : Converter.Factory {
|
||||
val typeData: TypeData,
|
||||
val ktorfit: Ktorfit,
|
||||
) : Converter.ResponseConverter<HttpResponse, Flow<Any?>> {
|
||||
override fun convert(getResponse: suspend () -> HttpResponse): Flow<Any?> {
|
||||
return flow {
|
||||
override fun convert(getResponse: suspend () -> HttpResponse): Flow<Any?> =
|
||||
flow {
|
||||
val response = getResponse()
|
||||
|
||||
val convertedBody = ktorfit.nextSuspendResponseConverter(
|
||||
@@ -33,7 +33,6 @@ class FlowConverterFactory : Converter.Factory {
|
||||
?: response.body(typeData.typeArgs.first().typeInfo)
|
||||
emit(convertedBody)
|
||||
}.flowOn(Dispatchers.IO)
|
||||
}
|
||||
}
|
||||
|
||||
override fun responseConverter(
|
||||
|
||||
@@ -35,6 +35,7 @@ actual class DateHandler
|
||||
setTimeStyle(NSDateFormatterNoStyle)
|
||||
setLocale(Locale.current.toPlatform())
|
||||
}
|
||||
|
||||
else -> NSDateFormatter()
|
||||
.apply {
|
||||
setDateFormat(format)
|
||||
|
||||
@@ -32,6 +32,7 @@ actual class DateHandler
|
||||
"" -> DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)
|
||||
.withLocale(Locale.current.toPlatform())
|
||||
.withZone(ZoneId.systemDefault())
|
||||
|
||||
else -> DateTimeFormatter.ofPattern(format)
|
||||
.withZone(ZoneId.systemDefault())
|
||||
}.let { formatter ->
|
||||
|
||||
Reference in New Issue
Block a user