Updated on 2026-08-14

This commit is contained in:
Tangem 2024-02-13 18:53:29 +03:00
parent c6ddab601b
commit 2e4d60e72c

View file

@ -77,7 +77,7 @@ class TruncateStart : BaseTruncate() {
class TruncateMiddle : BaseTruncate() {
override fun roughTruncate(text: String, residualLength: Int): String {
if (text.length <= residualLength) return text
if (text.length <= residualLength || residualLength < 0) return text
hasBeenTruncated = true
val halfOfResidualLength = residualLength / 2