diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-04 00:45:10 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-04 00:45:10 +0200 |
commit | e93af75b3df15f41b9a1701763c6815e774eae55 (patch) | |
tree | edadad920266fed617b90b0f5e48e80df5ff1270 /src/main/java/at/hannibal2/skyhanni | |
parent | 50465e49a4c6f729f72fdbefc88644447bb274e5 (diff) | |
download | skyhanni-e93af75b3df15f41b9a1701763c6815e774eae55.tar.gz skyhanni-e93af75b3df15f41b9a1701763c6815e774eae55.tar.bz2 skyhanni-e93af75b3df15f41b9a1701763c6815e774eae55.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 8ef5433e0..94d8dd10f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -315,22 +315,22 @@ object LorenzUtils { isCurrent: (T) -> Boolean, onChange: (T) -> Unit, ) { - val newList = mutableListOf<Any>() - newList.add(prefix) - for (entry in values) { - val display = getName(entry) - if (isCurrent(entry)) { - newList.add("§a[$display]") - } else { - newList.add("§e[") - newList.add(Renderable.link("§e$display") { - onChange(entry) - }) - newList.add("§e]") + add(buildList { + add(prefix) + for (entry in values) { + val display = getName(entry) + if (isCurrent(entry)) { + add("§a[$display]") + } else { + add("§e[") + add(Renderable.link("§e$display") { + onChange(entry) + }) + add("§e]") + } + add(" ") } - newList.add(" ") - } - add(newList) + }) } // TODO nea? |