Automatically reload config if received config has the same name as the active config

This commit is contained in:
2020-09-09 15:16:37 -05:00
parent bbf7a5b57a
commit d614b5ffe4

View File

@@ -110,9 +110,11 @@ public class PacketHandler {
final String path = TAC.CONFIGS_PATH + File.separator + configName + ".json";
Log.i(TAG, "Got valid json: " + json);
Backend.instance().writeToFile(path, json);
if (Backend.instance().getConfig().getName().equals(configName)) {
Backend.instance().loadConfig(configName);
}
}
private void handleDownloadConfig(Packet packet) {