Fixed repos not being displayed (fixes #100).

This commit is contained in:
Felix Ableitner 2014-08-24 16:51:17 +02:00
parent 734cbf8d9f
commit 4f9f7f123c
1 changed files with 11 additions and 1 deletions

View File

@ -454,7 +454,17 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener {
r.Directory = json.getString("Directory");
r.ID = json.getString("ID");
r.Invalid = json.getString("Invalid");
r.Nodes = getNodes(json.getJSONArray("Nodes"));
r.Nodes = new ArrayList<Node>();
JSONArray nodes = json.getJSONArray("Nodes");
for (int j = 0; i < nodes.length(); i++) {
JSONObject n = nodes.getJSONObject(i);
String id = n.getString("NodeID");
for (Node n2 : getNodes()) {
if (n2.NodeID.equals(id)) {
r.Nodes.add(n2);
}
}
}
r.ReadOnly = json.getBoolean("ReadOnly");
JSONObject versioning = json.getJSONObject("Versioning");