kopia lustrzana https://github.com/JOSM/MapWithAI
Fix issue with MapWithAI not being enabled as expected
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
015c8c7464
commit
608df6c7f1
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue