mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Updated Syncthing to v0.13.0-beta.4, adjusted to API changes.
This commit is contained in:
parent
63ab66448a
commit
1fba3dd53e
3 changed files with 5 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 0155b6f84171724686694417cd8015bdffb31e22
|
Subproject commit 459930df094b751d0a950598fe0cb1ec2094d705
|
|
@ -486,7 +486,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
r.deviceIds.add(n.getString("deviceID"));
|
r.deviceIds.add(n.getString("deviceID"));
|
||||||
}
|
}
|
||||||
|
|
||||||
r.readOnly = json.getBoolean("readOnly");
|
r.readOnly = json.getString("type").equals("readonly");
|
||||||
r.rescanIntervalS = json.getInt("rescanIntervalS");
|
r.rescanIntervalS = json.getInt("rescanIntervalS");
|
||||||
JSONObject versioning = json.getJSONObject("versioning");
|
JSONObject versioning = json.getJSONObject("versioning");
|
||||||
if (versioning.getString("type").equals("simple")) {
|
if (versioning.getString("type").equals("simple")) {
|
||||||
|
@ -877,7 +877,8 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
r.put("label", folder.label);
|
r.put("label", folder.label);
|
||||||
r.put("id", folder.id);
|
r.put("id", folder.id);
|
||||||
r.put("ignorePerms", true);
|
r.put("ignorePerms", true);
|
||||||
r.put("readOnly", folder.readOnly);
|
r.put("type", (folder.readOnly) ? "readonly" : "readwrite");
|
||||||
|
|
||||||
JSONArray devices = new JSONArray();
|
JSONArray devices = new JSONArray();
|
||||||
for (String n : folder.deviceIds) {
|
for (String n : folder.deviceIds) {
|
||||||
JSONObject element = new JSONObject();
|
JSONObject element = new JSONObject();
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class ConfigXml {
|
||||||
folder.setAttribute("id", mContext.getString(R.string.default_folder_id, model));
|
folder.setAttribute("id", mContext.getString(R.string.default_folder_id, model));
|
||||||
folder.setAttribute("path", Environment
|
folder.setAttribute("path", Environment
|
||||||
.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath());
|
.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath());
|
||||||
folder.setAttribute("ro", "true");
|
folder.setAttribute("type", "readonly");
|
||||||
saveChanges();
|
saveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue