diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-09-15 11:56:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-15 11:56:44 +0200 |
commit | 3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe (patch) | |
tree | c36b84cccdc5eae3673cd96390919a8c5d9444d2 /src/main/java/at | |
parent | a6ecdbcb42572739d4290bbaca463956c66b20cb (diff) | |
download | skyhanni-3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe.tar.gz skyhanni-3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe.tar.bz2 skyhanni-3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe.zip |
Fix: Scoreboard Error during M7 Dragons (#2510)
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 } } |