Automatic Lint

This commit is contained in:
Syer10
2024-03-29 00:16:52 +00:00
parent 253095fab1
commit b93c96a85b
48 changed files with 204 additions and 145 deletions

View File

@@ -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(

View File

@@ -35,6 +35,7 @@ actual class DateHandler
setTimeStyle(NSDateFormatterNoStyle)
setLocale(Locale.current.toPlatform())
}
else -> NSDateFormatter()
.apply {
setDateFormat(format)

View File

@@ -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 ->