Fix issue with MapWithAI not being enabled as expected

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-02-24 17:44:50 -07:00
rodzic 015c8c7464
commit 608df6c7f1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -75,10 +75,11 @@ public class DataAvailability {
jsonParser.next();
JsonObject jsonObject = jsonParser.getObject();
for (Entry<String, JsonValue> entry : jsonObject.entrySet()) {
JsonValue parameters = entry.getValue().asJsonObject().getJsonArray("parameters");
DataUrl url = new DataUrl(entry.getKey(), entry.getValue().asJsonObject().getString("url", ""), false,
JsonObject json = entry.getValue().asJsonObject();
JsonValue parameters = json.getJsonArray("parameters");
boolean enabled = json.getBoolean("default", false);
DataUrl url = new DataUrl(entry.getKey(), json.getString("url", ""), enabled,
parameters == null ? "[]" : parameters.toString());
boolean enabled = entry.getValue().asJsonObject().getBoolean("default", false);
MapWithAIPreferenceHelper.setMapWithAIUrl(url, enabled, true);
}
} catch (JsonException | IOException e) {