mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-24 10:55:54 +00:00
* Enable largeBlocks for new folders by default (fixes #300) * Remove duplicate code to set folder defaults on creation
This commit is contained in:
parent
5151c3485b
commit
9187280687
3 changed files with 6 additions and 9 deletions
|
@ -663,13 +663,6 @@ public class FolderActivity extends SyncthingActivity {
|
||||||
? getIntent().getStringExtra(EXTRA_FOLDER_ID)
|
? getIntent().getStringExtra(EXTRA_FOLDER_ID)
|
||||||
: generateRandomFolderId();
|
: generateRandomFolderId();
|
||||||
mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL);
|
mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL);
|
||||||
mFolder.fsWatcherEnabled = true;
|
|
||||||
mFolder.fsWatcherDelayS = 10;
|
|
||||||
/**
|
|
||||||
* Folder rescan interval defaults to 3600s as it is the default in
|
|
||||||
* syncthing when the file watcher is enabled and a new folder is created.
|
|
||||||
*/
|
|
||||||
mFolder.rescanIntervalS = 3600;
|
|
||||||
mFolder.paused = false;
|
mFolder.paused = false;
|
||||||
mFolder.type = Constants.FOLDER_TYPE_SEND_RECEIVE; // Default for {@link #checkWriteAndUpdateUI}.
|
mFolder.type = Constants.FOLDER_TYPE_SEND_RECEIVE; // Default for {@link #checkWriteAndUpdateUI}.
|
||||||
mFolder.minDiskFree = new Folder.MinDiskFree();
|
mFolder.minDiskFree = new Folder.MinDiskFree();
|
||||||
|
|
|
@ -27,6 +27,10 @@ public class Folder {
|
||||||
public boolean fsWatcherEnabled = true;
|
public boolean fsWatcherEnabled = true;
|
||||||
public int fsWatcherDelayS = 10;
|
public int fsWatcherDelayS = 10;
|
||||||
private List<Device> devices = new ArrayList<>();
|
private List<Device> devices = new ArrayList<>();
|
||||||
|
/**
|
||||||
|
* Folder rescan interval defaults to 3600s as it is the default in
|
||||||
|
* syncthing when the file watcher is enabled and a new folder is created.
|
||||||
|
*/
|
||||||
public int rescanIntervalS = 3600;
|
public int rescanIntervalS = 3600;
|
||||||
public boolean ignorePerms = true;
|
public boolean ignorePerms = true;
|
||||||
public boolean autoNormalize = true;
|
public boolean autoNormalize = true;
|
||||||
|
@ -43,7 +47,7 @@ public class Folder {
|
||||||
public boolean disableSparseFiles = false;
|
public boolean disableSparseFiles = false;
|
||||||
public boolean disableTempIndexes = false;
|
public boolean disableTempIndexes = false;
|
||||||
public boolean paused = false;
|
public boolean paused = false;
|
||||||
public boolean useLargeBlocks = false;
|
public boolean useLargeBlocks = true;
|
||||||
public int weakHashThresholdPct = 25;
|
public int weakHashThresholdPct = 25;
|
||||||
public String markerName = ".stfolder";
|
public String markerName = ".stfolder";
|
||||||
|
|
||||||
|
|
|
@ -435,7 +435,7 @@ public class ConfigXml {
|
||||||
folder.hashers = getContentOrDefault(r.getElementsByTagName("hashers").item(0), 0);
|
folder.hashers = getContentOrDefault(r.getElementsByTagName("hashers").item(0), 0);
|
||||||
folder.order = getContentOrDefault(r.getElementsByTagName("order").item(0), "random");
|
folder.order = getContentOrDefault(r.getElementsByTagName("order").item(0), "random");
|
||||||
folder.paused = getContentOrDefault(r.getElementsByTagName("paused").item(0), false);
|
folder.paused = getContentOrDefault(r.getElementsByTagName("paused").item(0), false);
|
||||||
folder.useLargeBlocks = getContentOrDefault(r.getElementsByTagName("useLargeBlocks").item(0), false);
|
folder.useLargeBlocks = getContentOrDefault(r.getElementsByTagName("useLargeBlocks").item(0), true);
|
||||||
folder.copyOwnershipFromParent = getContentOrDefault(r.getElementsByTagName("copyOwnershipFromParent").item(0), false);
|
folder.copyOwnershipFromParent = getContentOrDefault(r.getElementsByTagName("copyOwnershipFromParent").item(0), false);
|
||||||
|
|
||||||
// Devices
|
// Devices
|
||||||
|
|
Loading…
Reference in a new issue