Compare commits
No commits in common. "fb913984627f1f231baa31accbeb071265b798d0" and "105dadd7980f79148858b0e128f139c576f313eb" have entirely different histories.
fb91398462
...
105dadd798
|
@ -39,12 +39,11 @@ data class SelectCommunityPostResponse @QueryProjection constructor(
|
||||||
if (existOrdered) {
|
if (existOrdered) {
|
||||||
content
|
content
|
||||||
} else {
|
} else {
|
||||||
val length = content.codePointCount(0, content.length)
|
if (content.length > 15) {
|
||||||
if (length > 15) {
|
|
||||||
val endIndex = content.offsetByCodePoints(0, 15)
|
val endIndex = content.offsetByCodePoints(0, 15)
|
||||||
content.substring(0, endIndex).plus("...")
|
content.substring(0, endIndex).plus("...")
|
||||||
} else {
|
} else {
|
||||||
val endIndex = content.offsetByCodePoints(0, length / 2)
|
val endIndex = content.offsetByCodePoints(0, content.length / 2)
|
||||||
content.substring(0, endIndex).plus("...")
|
content.substring(0, endIndex).plus("...")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue