fix: 正常に永続化されるように

This commit is contained in:
usbharu 2025-05-12 00:12:57 +09:00
parent 3c604abe37
commit c88ff0b3fe
Signed by: usbharu
GPG Key ID: 8CB1087135660B8D
2 changed files with 8 additions and 2 deletions

View File

@ -44,6 +44,7 @@ class PostContent {
other as PostContent other as PostContent
if (wasTruncated != other.wasTruncated) return false
if (text != other.text) return false if (text != other.text) return false
if (content != other.content) return false if (content != other.content) return false
if (emojiIds != other.emojiIds) return false if (emojiIds != other.emojiIds) return false
@ -52,7 +53,8 @@ class PostContent {
} }
override fun hashCode(): Int { 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 + content.hashCode()
result = 31 * result + emojiIds.hashCode() result = 31 * result + emojiIds.hashCode()
return result return result
@ -62,7 +64,10 @@ class PostContent {
return "PostContent(" + return "PostContent(" +
"text='$text', " + "text='$text', " +
"content='$content', " + "content='$content', " +
"emojiIds=$emojiIds" + "emojiIds=$emojiIds, " +
"wasTruncated=$wasTruncated" +
")" ")"
} }
} }

View File

@ -75,6 +75,7 @@ class ExposedPostRepository(
it[deleted] = post.deleted it[deleted] = post.deleted
it[hide] = post.hide it[hide] = post.hide
it[moveTo] = post.moveTo?.id it[moveTo] = post.moveTo?.id
it[wasTruncated] = post.wasTruncated
} }
PostsMedia.deleteWhere { PostsMedia.deleteWhere {
postId eq post.id.id postId eq post.id.id