Fix moar ktlint issues
This commit is contained in:
parent
a831f05f6e
commit
5d086ad82d
528 changed files with 146 additions and 629 deletions
|
|
@ -36,7 +36,6 @@ class DateFormatters @Inject constructor(
|
|||
private val clock: Clock,
|
||||
private val timeZone: TimeZone,
|
||||
) {
|
||||
|
||||
private val onlyTimeFormatter: DateTimeFormatter by lazy {
|
||||
val pattern = DateFormat.getBestDateTimePattern(locale, "HH:mm") ?: "HH:mm"
|
||||
DateTimeFormatter.ofPattern(pattern, locale)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ class DefaultDaySeparatorFormatter @Inject constructor(
|
|||
private val localDateTimeProvider: LocalDateTimeProvider,
|
||||
private val dateFormatters: DateFormatters,
|
||||
) : DaySeparatorFormatter {
|
||||
|
||||
override fun format(timestamp: Long): String {
|
||||
val dateToFormat = localDateTimeProvider.providesFromTimestamp(timestamp)
|
||||
return dateFormatters.formatDateWithYear(dateToFormat)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ class DefaultLastMessageTimestampFormatter @Inject constructor(
|
|||
private val localDateTimeProvider: LocalDateTimeProvider,
|
||||
private val dateFormatters: DateFormatters,
|
||||
) : LastMessageTimestampFormatter {
|
||||
|
||||
override fun format(timestamp: Long?): String {
|
||||
if (timestamp == null) return ""
|
||||
val currentDate = localDateTimeProvider.providesNow()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class LocalDateTimeProvider @Inject constructor(
|
|||
private val clock: Clock,
|
||||
private val timezone: TimeZone,
|
||||
) {
|
||||
|
||||
fun providesNow(): LocalDateTime {
|
||||
val now: Instant = clock.now()
|
||||
return now.toLocalDateTime(timezone)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import org.junit.Test
|
|||
import java.util.Locale
|
||||
|
||||
class DefaultLastMessageTimestampFormatterTest {
|
||||
|
||||
@Test
|
||||
fun `test null`() {
|
||||
val now = "1980-04-06T18:35:24.00Z"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue