Copy macros directly in Configuration.kt
This commit is contained in:
parent
c7729af67f
commit
3008165c22
|
@ -75,8 +75,8 @@ object Configuration {
|
||||||
val macros: MutableSet<Macro> = run {
|
val macros: MutableSet<Macro> = run {
|
||||||
if (!macroFile.exists()) macroFile.createNewFile()
|
if (!macroFile.exists()) macroFile.createNewFile()
|
||||||
macroFile.readLines(Charset.forName("UTF-8")).map {
|
macroFile.readLines(Charset.forName("UTF-8")).map {
|
||||||
Snowy.Gson.fromJson(it, Macro::class.java)
|
Snowy.Gson.fromJson(it, Macro::class.java).copy()
|
||||||
}.map { it.copy() }.toMutableSet()
|
}.toMutableSet()
|
||||||
}
|
}
|
||||||
init {
|
init {
|
||||||
Runtime.getRuntime().addShutdownHook(
|
Runtime.getRuntime().addShutdownHook(
|
||||||
|
|
Loading…
Reference in New Issue