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 return id == other.id
} }
override fun hashCode(): Int = id.hashCode() override fun hashCode(): Int = id.hashCode()
override fun toString(): String { override fun toString(): String {

View File

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

View File

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

View File

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

View File

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