File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/main/kotlin/com/lambda/config Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,8 @@ open class AutomationConfig(
145145 ) = TypedEditBuilder (this @AutomationConfig, settings.map { it.delegate } as List <AbstractSetting <T >>).edits(other.delegate as AbstractSetting <R >)
146146
147147 @SettingEditorDsl
148- fun hide (vararg settings : KProperty0 <* >) = {
149- (settings.map { it.delegate } as List <AbstractSetting <* >>).let { removed ->
150- this @AutomationConfig.settings.removeAll(removed)
151- hiddenSettings.addAll(removed)
152- }
148+ fun hide (vararg settings : KProperty0 <* >) {
149+ hideAll((settings.map { it.delegate } as List <AbstractSetting <* >>))
153150 }
154151
155152 @SettingEditorDsl
@@ -163,10 +160,7 @@ open class AutomationConfig(
163160
164161 @SettingEditorDsl
165162 fun hideAll (vararg settingGroups : SettingGroup ) {
166- settingGroups.flatMap { it.settings }.let { removed ->
167- settings.removeAll(removed)
168- hiddenSettings.addAll(removed)
169- }
163+ settingGroups.forEach { hideAll(it.settings) }
170164 }
171165
172166 @SettingEditorDsl
You can’t perform that action at this time.
0 commit comments