diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt index 378fe03c6..a8cafcf3d 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt @@ -51,16 +51,13 @@ object ScoreboardData { val lastColor = start.lastColorCode() ?: "" // Generate the list of color suffixes - val colorSuffixes = generateSequence(lastColor) { it.dropLast(2) } - .takeWhile { it.isNotEmpty() } - .toMutableList() + val colorSuffixes = lastColor.chunked(2).toMutableList() // Iterate through the colorSuffixes to remove matching prefixes from 'end' for (suffix in colorSuffixes.toList()) { if (end.startsWith(suffix)) { end = end.removePrefix(suffix) colorSuffixes.remove(suffix) - break } } |