From c88ff0b3fe50ad2f3ee414b5cd038cf777086c0d Mon Sep 17 00:00:00 2001 From: usbharu Date: Mon, 12 May 2025 00:12:57 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=AD=A3=E5=B8=B8=E3=81=AB=E6=B0=B8?= =?UTF-8?q?=E7=B6=9A=E5=8C=96=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hideout/core/domain/model/post/PostContent.kt | 9 +++++++-- .../exposedrepository/ExposedPostRepository.kt | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/post/PostContent.kt b/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/post/PostContent.kt index eb421ebd..86986c8d 100644 --- a/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/post/PostContent.kt +++ b/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/post/PostContent.kt @@ -44,6 +44,7 @@ class PostContent { other as PostContent + if (wasTruncated != other.wasTruncated) return false if (text != other.text) return false if (content != other.content) return false if (emojiIds != other.emojiIds) return false @@ -52,7 +53,8 @@ class PostContent { } override fun hashCode(): Int { - var result = text.hashCode() + var result = wasTruncated.hashCode() + result = 31 * result + text.hashCode() result = 31 * result + content.hashCode() result = 31 * result + emojiIds.hashCode() return result @@ -62,7 +64,10 @@ class PostContent { return "PostContent(" + "text='$text', " + "content='$content', " + - "emojiIds=$emojiIds" + + "emojiIds=$emojiIds, " + + "wasTruncated=$wasTruncated" + ")" } + + } diff --git a/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt b/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt index dd3b5914..2525fc19 100644 --- a/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt +++ b/hideout/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedPostRepository.kt @@ -75,6 +75,7 @@ class ExposedPostRepository( it[deleted] = post.deleted it[hide] = post.hide it[moveTo] = post.moveTo?.id + it[wasTruncated] = post.wasTruncated } PostsMedia.deleteWhere { postId eq post.id.id