Skip to content

Commit 9ba5a7a

Browse files
committed
Nullsafety on tag sets
1 parent b476148 commit 9ba5a7a

File tree

1 file changed

+8
-4
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/client

1 file changed

+8
-4
lines changed

common/src/main/kotlin/com/lambda/module/modules/client/NewCGui.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@ object NewCGui : Module(
4141
tags.forEachIndexed { i, tag ->
4242
val windowPosition = Vec2d.ONE * 20.0 + Vec2d.RIGHT * ((115.0 * i) + (i + 1) * 4)
4343

44-
window(position = windowPosition, title = tag.name, autoResize = Window.AutoResize.ByConfig) {
45-
val tagModules = modules.filter { it.defaultTags.first() == tag }
46-
47-
tagModules.forEach { module ->
44+
window(
45+
position = windowPosition,
46+
title = tag.name,
47+
autoResize = Window.AutoResize.ByConfig
48+
) {
49+
modules.filter {
50+
it.defaultTags.firstOrNull() == tag
51+
}.forEach { module ->
4852
moduleLayout(module)
4953
}
5054
}

0 commit comments

Comments
 (0)