From 76b793440756a50e48b377520894a6f740748e9c Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 12 Nov 2024 21:56:46 +0100 Subject: docs: Add information about id replacements --- src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt') 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 { left, right -> - if (left == "builtin") return@Comparator -1 - if (right == "builtin") return@Comparator 1 - return@Comparator left.compareTo(right) - })).toList() + .sortedWith( + Comparator + .comparing({ it.key == "builtin" }) + .reversed() + .then(Comparator.comparing({ it.key })) + ).toList() } } } -- cgit