Skip to content

Commit c88dc0e

Browse files
committed
Change sort operation from on render to on load
1 parent 2948a38 commit c88dc0e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/main/kotlin/com/lambda/gui/components/ClickGuiLayout.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ object ClickGuiLayout : Loadable, Configurable(GuiConfig) {
202202
window(tag.name, flags = AlwaysAutoResize) {
203203
ModuleRegistry.modules
204204
.filter { it.tag == tag }
205-
.sortedBy { it.name }
206205
.forEach { with(ModuleEntry(it)) { buildLayout() } }
207206
}
208207
}

src/main/kotlin/com/lambda/module/ModuleRegistry.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import com.lambda.util.reflections.getInstances
2525
*/
2626
object ModuleRegistry : Loadable {
2727
override val priority = 1
28-
val modules = getInstances<Module>().toMutableList()
28+
val modules = getInstances<Module>().toMutableList().sortedBy { it.name }
2929

3030
val moduleNames: Set<String>
3131
get() = modules.map { it.name }.toSet()

0 commit comments

Comments
 (0)