diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-12 21:56:46 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-12 21:56:46 +0100 |
commit | 76b793440756a50e48b377520894a6f740748e9c (patch) | |
tree | 33eb3bf3fa12af7f09b7b5f6530677d6d3eaa93d /src/main/kotlin | |
parent | fc88e54a2e88c87bcfd5e7dbd6866764faa3e503 (diff) | |
download | Firmament-76b793440756a50e48b377520894a6f740748e9c.tar.gz Firmament-76b793440756a50e48b377520894a6f740748e9c.tar.bz2 Firmament-76b793440756a50e48b377520894a6f740748e9c.zip |
docs: Add information about id replacements
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt b/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt index 5aaa5fa..faad1cc 100644 --- a/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt +++ b/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt @@ -13,13 +13,12 @@ interface FirmamentConfigScreenProvider { val providers by lazy { allValidInstances .filter { it.isEnabled } - .sortedWith(Comparator.comparing( - { it.key }, - Comparator<String> { left, right -> - if (left == "builtin") return@Comparator -1 - if (right == "builtin") return@Comparator 1 - return@Comparator left.compareTo(right) - })).toList() + .sortedWith( + Comparator + .comparing<FirmamentConfigScreenProvider, Boolean>({ it.key == "builtin" }) + .reversed() + .then(Comparator.comparing({ it.key })) + ).toList() } } } |