mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Исправлено форматирование при сохранении конфигурации
This commit is contained in:
parent
4af4a002a7
commit
27db641eae
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ public JsonConfigurable(Type type, Path configPath) {
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public void saveConfig(Path configPath) throws IOException {
|
public void saveConfig(Path configPath) throws IOException {
|
||||||
try (BufferedWriter writer = IOHelper.newWriter(configPath)) {
|
try (BufferedWriter writer = IOHelper.newWriter(configPath)) {
|
||||||
Launcher.gsonManager.gson.toJson(getConfig(), type, writer);
|
Launcher.gsonManager.configGson.toJson(getConfig(), type, writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public void saveConfig(Path configPath) throws IOException {
|
||||||
public void loadConfig(Path configPath) throws IOException {
|
public void loadConfig(Path configPath) throws IOException {
|
||||||
if (generateConfigIfNotExists(configPath)) return;
|
if (generateConfigIfNotExists(configPath)) return;
|
||||||
try (BufferedReader reader = IOHelper.newReader(configPath)) {
|
try (BufferedReader reader = IOHelper.newReader(configPath)) {
|
||||||
setConfig(Launcher.gsonManager.gson.fromJson(reader, type));
|
setConfig(Launcher.gsonManager.configGson.fromJson(reader, type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue