From 3008165c22874e111338e524a87fbae6e6906999 Mon Sep 17 00:00:00 2001 From: Username404 Date: Thu, 20 May 2021 15:24:06 +0200 Subject: [PATCH] Copy macros directly in Configuration.kt --- .../kotlin/fr/username404/snowygui/config/Configuration.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt index dd24fd8..070b0dd 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt @@ -75,8 +75,8 @@ object Configuration { val macros: MutableSet = run { if (!macroFile.exists()) macroFile.createNewFile() macroFile.readLines(Charset.forName("UTF-8")).map { - Snowy.Gson.fromJson(it, Macro::class.java) - }.map { it.copy() }.toMutableSet() + Snowy.Gson.fromJson(it, Macro::class.java).copy() + }.toMutableSet() } init { Runtime.getRuntime().addShutdownHook(