diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java
index 11c7970e..1f66b97c 100644
--- a/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java
+++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java
@@ -109,6 +109,7 @@ public class FolderActivity extends SyncthingActivity
private TextView mPullOrderDescriptionView;
private TextView mVersioningDescriptionView;
private TextView mVersioningTypeView;
+ private SwitchCompat mVariableSizeBlocks;
private TextView mEditIgnoreListTitle;
private EditText mEditIgnoreListContent;
@@ -162,6 +163,10 @@ public class FolderActivity extends SyncthingActivity
}
mFolderNeedsToUpdate = true;
break;
+ case R.id.variableSizeBlocks:
+ mFolder.useLargeBlocks = isChecked;
+ mFolderNeedsToUpdate = true;
+ break;
}
}
};
@@ -193,6 +198,7 @@ public class FolderActivity extends SyncthingActivity
mPullOrderDescriptionView = findViewById(R.id.pullOrderDescription);
mVersioningDescriptionView = findViewById(R.id.versioningDescription);
mVersioningTypeView = findViewById(R.id.versioningType);
+ mVariableSizeBlocks = findViewById(R.id.variableSizeBlocks);
mDevicesContainer = findViewById(R.id.devicesContainer);
mEditIgnoreListTitle = findViewById(R.id.edit_ignore_list_title);
mEditIgnoreListContent = findViewById(R.id.edit_ignore_list_content);
@@ -449,6 +455,7 @@ public class FolderActivity extends SyncthingActivity
mFolderFileWatcher.setOnCheckedChangeListener(null);
mFolderPaused.setOnCheckedChangeListener(null);
mCustomSyncConditionsSwitch.setOnCheckedChangeListener(null);
+ mVariableSizeBlocks.setOnCheckedChangeListener(null);
// Update views
mLabelView.setText(mFolder.label);
@@ -458,6 +465,7 @@ public class FolderActivity extends SyncthingActivity
updateVersioningDescription();
mFolderFileWatcher.setChecked(mFolder.fsWatcherEnabled);
mFolderPaused.setChecked(mFolder.paused);
+ mVariableSizeBlocks.setChecked(mFolder.useLargeBlocks);
findViewById(R.id.editIgnoresContainer).setVisibility(mIsCreateMode ? View.GONE : View.VISIBLE);
// Update views - custom sync conditions.
@@ -491,6 +499,7 @@ public class FolderActivity extends SyncthingActivity
mFolderFileWatcher.setOnCheckedChangeListener(mCheckedListener);
mFolderPaused.setOnCheckedChangeListener(mCheckedListener);
mCustomSyncConditionsSwitch.setOnCheckedChangeListener(mCheckedListener);
+ mVariableSizeBlocks.setOnCheckedChangeListener(mCheckedListener);
}
@Override
diff --git a/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java b/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java
index bd920003..9dd462f1 100644
--- a/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java
+++ b/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java
@@ -13,6 +13,7 @@ import java.util.Map;
public class Folder {
+ // Folder Configuration
public String id;
public String label;
public String filesystemType = "basic";
@@ -30,16 +31,18 @@ public class Folder {
public int pullerMaxPendingKiB;
public int hashers = 0;
public String order = "random";
- public boolean ignoreDelete;
- public int scanProgressIntervalS;
- public int pullerPauseS;
+ public boolean ignoreDelete = false;
+ public int scanProgressIntervalS = 0;
+ public int pullerPauseS = 0;
public int maxConflicts = 10;
- public boolean disableSparseFiles;
- public boolean disableTempIndexes;
- public boolean paused;
- public boolean useLargeBlocks;
+ public boolean disableSparseFiles = false;
+ public boolean disableTempIndexes = false;
+ public boolean paused = false;
+ public boolean useLargeBlocks = false;
public int weakHashThresholdPct = 25;
public String markerName = ".stfolder";
+
+ // Folder Status
public String invalid;
public static class Versioning implements Serializable {
diff --git a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java
index f1737655..76c44ae7 100644
--- a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java
+++ b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java
@@ -398,6 +398,7 @@ public class ConfigXml {
folder.hashers = getContentOrDefault(r.getElementsByTagName("hashers").item(0), 0);
folder.order = getContentOrDefault(r.getElementsByTagName("order").item(0), "random");
folder.paused = getContentOrDefault(r.getElementsByTagName("paused").item(0), false);
+ folder.useLargeBlocks = getContentOrDefault(r.getElementsByTagName("useLargeBlocks").item(0), false);
// Devices
/*
@@ -480,6 +481,7 @@ public class ConfigXml {
setConfigElement(r, "hashers", Integer.toString(folder.hashers));
setConfigElement(r, "order", folder.order);
setConfigElement(r, "paused", Boolean.toString(folder.paused));
+ setConfigElement(r, "useLargeBlocks", Boolean.toString(folder.useLargeBlocks));
// Update devices that share this folder.
// Pass 1: Remove all devices below that folder in XML except the local device.
diff --git a/app/src/main/res/drawable-hdpi/ic_developer_board_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_developer_board_black_24dp.png
new file mode 100644
index 00000000..e4b9f2e0
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_developer_board_black_24dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_developer_board_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_developer_board_black_24dp.png
new file mode 100644
index 00000000..8dbba68d
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_developer_board_black_24dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_developer_board_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_developer_board_black_24dp.png
new file mode 100644
index 00000000..fd284354
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_developer_board_black_24dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_developer_board_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_developer_board_black_24dp.png
new file mode 100644
index 00000000..8cba3f14
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_developer_board_black_24dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_developer_board_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_developer_board_black_24dp.png
new file mode 100644
index 00000000..264dd59c
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_developer_board_black_24dp.png differ
diff --git a/app/src/main/res/layout/fragment_folder.xml b/app/src/main/res/layout/fragment_folder.xml
index 99d12898..04e1fcda 100644
--- a/app/src/main/res/layout/fragment_folder.xml
+++ b/app/src/main/res/layout/fragment_folder.xml
@@ -277,6 +277,28 @@
+
+
+
+
+
Watch for changes
Asks operating system to notify about changes to files. If disabled falls back to periodic hourly scans.
+
+ Variable Size Blocks
+ Variable size blocks (also "large blocks") are more efficient for large files. If you enable this on one folder, you have to enable it for this folder on all devices.
+
Pause Folder