style: fix lint (CI)

This commit is contained in:
usbharu 2024-08-23 15:20:28 +00:00 committed by github-actions[bot]
parent 486268609b
commit 896e7de1ec
5 changed files with 12 additions and 13 deletions

View File

@ -48,7 +48,6 @@ class Media(
return id == other.id
}
override fun hashCode(): Int = id.hashCode()
override fun toString(): String {

View File

@ -61,9 +61,9 @@ class TimelineObject(
lastUpdatedAt = Instant.now()
isPureRepost =
post.repostId != null &&
post.replyId == null &&
post.text.isEmpty() &&
post.overview?.overview.isNullOrEmpty()
post.replyId == null &&
post.text.isEmpty() &&
post.overview?.overview.isNullOrEmpty()
warnFilters = filterResults.map { TimelineObjectWarnFilter(it.filter.id, it.matchedKeyword) }
}

View File

@ -243,8 +243,8 @@ abstract class AbstractTimelineStore(private val idGenerateService: IdGenerateSe
val actors =
getActors(
timelineObjectList.map { it.postActorId } +
timelineObjectList.mapNotNull { it.repostActorId } +
timelineObjectList.mapNotNull { it.replyActorId }
timelineObjectList.mapNotNull { it.repostActorId } +
timelineObjectList.mapNotNull { it.replyActorId }
)
val postMap = posts.associate { post ->
@ -253,7 +253,7 @@ abstract class AbstractTimelineStore(private val idGenerateService: IdGenerateSe
val mediaMap = getMedias(
posts.flatMap { it.mediaIds } +
actors.mapNotNull { it.value.icon }
actors.mapNotNull { it.value.icon }
)
return PaginationList(

View File

@ -61,10 +61,10 @@ class StatusQueryServiceImpl : StatusQueryService {
.select(Posts.columns)
.where {
Posts.visibility eq Visibility.PUBLIC.name or
(Posts.visibility eq Visibility.UNLISTED.name) or
(Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or
(Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or
(Posts.actorId eq principal.actorId.id)
(Posts.visibility eq Visibility.UNLISTED.name) or
(Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or
(Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or
(Posts.actorId eq principal.actorId.id)
}
.alias("authorized_table")
}

View File

@ -66,8 +66,8 @@ class StatusesRequest {
override fun toString(): String {
return "StatusesRequest(status=$status, mediaIds=$media_ids, poll=$poll, inReplyToId=$in_reply_to_id, " +
"sensitive=$sensitive, spoilerText=$spoiler_text, visibility=$visibility, language=$language," +
" scheduledAt=$scheduled_at)"
"sensitive=$sensitive, spoilerText=$spoiler_text, visibility=$visibility, language=$language," +
" scheduledAt=$scheduled_at)"
}
@Suppress("EnumNaming", "EnumEntryNameCase")