mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Use optString, added link.
This commit is contained in:
parent
9e232254ab
commit
86d50d75ff
1 changed files with 3 additions and 5 deletions
|
@ -529,11 +529,9 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
|||
Folder r = new Folder();
|
||||
r.path = json.getString("path");
|
||||
r.id = json.getString("id");
|
||||
if (json.has("invalid")) {
|
||||
r.invalid = json.getString("invalid"); // TODO Upstream bug
|
||||
} else {
|
||||
r.invalid = "";
|
||||
}
|
||||
// TODO: Field seems to be missing sometimes.
|
||||
// https://github.com/syncthing/syncthing-android/issues/291
|
||||
r.invalid = json.optString("invalid");
|
||||
r.deviceIds = new ArrayList<>();
|
||||
JSONArray devices = json.getJSONArray("devices");
|
||||
for (int j = 0; j < devices.length(); j++) {
|
||||
|
|
Loading…
Reference in a new issue