Compare commits

..

No commits in common. "fb913984627f1f231baa31accbeb071265b798d0" and "105dadd7980f79148858b0e128f139c576f313eb" have entirely different histories.

1 changed files with 2 additions and 3 deletions

View File

@ -39,12 +39,11 @@ data class SelectCommunityPostResponse @QueryProjection constructor(
if (existOrdered) {
content
} else {
val length = content.codePointCount(0, content.length)
if (length > 15) {
if (content.length > 15) {
val endIndex = content.offsetByCodePoints(0, 15)
content.substring(0, endIndex).plus("...")
} else {
val endIndex = content.offsetByCodePoints(0, length / 2)
val endIndex = content.offsetByCodePoints(0, content.length / 2)
content.substring(0, endIndex).plus("...")
}
}