Skip to content

Commit

Permalink
ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemke committed Nov 15, 2023
1 parent aa72051 commit 8f7e10e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ enum class NotificationType(
}

fun on(i: Int): Boolean =
Integer.toBinaryString(i).padStart(MAX, '0')[pos-1] == '1'
Integer.toBinaryString(i).padStart(MAX, '0')[pos - 1] == '1'

fun tag(postfix: String) = "$tag-$postfix"
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ data class Notification(
@field:CreationTimestamp
@Column(name = "created", nullable = false, updatable = false)
var created: Instant? = null,
) {
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ constructor(
.status(if (n.id == null) HttpStatus.CREATED else HttpStatus.OK)
.body(NotificationViewDto.toDto(notificationService.save(n)))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ data class NotificationTypeDto(
fun fromDtos(dtos: List<NotificationTypeDto>): Int =
NotificationType.fromSetting(dtos.map { it.pos }, dtos.map { it.on })
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ constructor(
fun save(games: List<Game>, relrank: Map<Long, BigDecimal>): List<Ranking> {
val prev = rankingRepository.findAll()
if ((prev.mapNotNull { it.modified }.maxOrNull() ?: Instant.MIN)
.isAfter((games.mapNotNull { it.reportedAt }.maxOrNull() ?: Instant.MIN))
.isAfter((games.mapNotNull { it.reportedAt }.maxOrNull() ?: Instant.MIN))
) {
logger.warn("There are no new games.")
return prev
Expand Down

0 comments on commit 8f7e10e

Please sign in to comment.