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