From 0eb8ccdda4d6056aa0d3b3bfadc81636d6502cd3 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Sat, 15 Jun 2019 11:33:54 +0200 Subject: [PATCH] Remove config val+UI: userLargeBlocks --- .../activities/FolderActivity.java | 9 ----- .../syncthingandroid/model/Folder.java | 1 - .../syncthingandroid/util/ConfigXml.java | 3 -- app/src/main/res/layout/activity_folder.xml | 33 ------------------- app/src/main/res/values/strings.xml | 4 --- 5 files changed, 50 deletions(-) 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 fd421eb6..fda2d2e2 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java @@ -111,7 +111,6 @@ public class FolderActivity extends SyncthingActivity { private TextView mPullOrderDescriptionView; private TextView mVersioningDescriptionView; private TextView mVersioningTypeView; - private SwitchCompat mVariableSizeBlocks; private ViewGroup mIgnoreDeleteContainer; private SwitchCompat mIgnoreDelete; private TextView mEditIgnoreListTitle; @@ -175,10 +174,6 @@ public class FolderActivity extends SyncthingActivity { } mFolderNeedsToUpdate = true; break; - case R.id.variableSizeBlocks: - mFolder.useLargeBlocks = isChecked; - mFolderNeedsToUpdate = true; - break; case R.id.ignoreDelete: mFolder.ignoreDelete = isChecked; mFolderNeedsToUpdate = true; @@ -214,7 +209,6 @@ 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); mIgnoreDeleteContainer = findViewById(R.id.ignoreDeleteContainer); mIgnoreDelete = findViewById(R.id.ignoreDelete); mDevicesContainer = findViewById(R.id.devicesContainer); @@ -476,7 +470,6 @@ public class FolderActivity extends SyncthingActivity { mFolderFileWatcher.setOnCheckedChangeListener(null); mFolderPaused.setOnCheckedChangeListener(null); mCustomSyncConditionsSwitch.setOnCheckedChangeListener(null); - mVariableSizeBlocks.setOnCheckedChangeListener(null); mIgnoreDelete.setOnCheckedChangeListener(null); // Update views @@ -487,7 +480,6 @@ public class FolderActivity extends SyncthingActivity { updateVersioningDescription(); mFolderFileWatcher.setChecked(mFolder.fsWatcherEnabled); mFolderPaused.setChecked(mFolder.paused); - mVariableSizeBlocks.setChecked(mFolder.useLargeBlocks); mIgnoreDelete.setChecked(mFolder.ignoreDelete); findViewById(R.id.editIgnoresContainer).setVisibility(mIsCreateMode ? View.GONE : View.VISIBLE); @@ -523,7 +515,6 @@ public class FolderActivity extends SyncthingActivity { mFolderFileWatcher.setOnCheckedChangeListener(mCheckedListener); mFolderPaused.setOnCheckedChangeListener(mCheckedListener); mCustomSyncConditionsSwitch.setOnCheckedChangeListener(mCheckedListener); - mVariableSizeBlocks.setOnCheckedChangeListener(mCheckedListener); mIgnoreDelete.setOnCheckedChangeListener(mCheckedListener); } 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 50af0c07..c5e4b81a 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java @@ -47,7 +47,6 @@ public class Folder { public boolean disableSparseFiles = false; public boolean disableTempIndexes = false; public boolean paused = false; - public boolean useLargeBlocks = true; public int weakHashThresholdPct = 25; public String markerName = ".stfolder"; 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 a6a12162..bf02f1c2 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -438,7 +438,6 @@ public class ConfigXml { folder.hashers = getContentOrDefault(r.getElementsByTagName("hashers").item(0), folder.hashers); folder.order = getContentOrDefault(r.getElementsByTagName("order").item(0), folder.order); folder.paused = getContentOrDefault(r.getElementsByTagName("paused").item(0), folder.paused); - folder.useLargeBlocks = getContentOrDefault(r.getElementsByTagName("useLargeBlocks").item(0), folder.useLargeBlocks); folder.ignoreDelete = getContentOrDefault(r.getElementsByTagName("ignoreDelete").item(0), folder.ignoreDelete); folder.copyOwnershipFromParent = getContentOrDefault(r.getElementsByTagName("copyOwnershipFromParent").item(0), folder.copyOwnershipFromParent); @@ -535,7 +534,6 @@ 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)); setConfigElement(r, "ignoreDelete", Boolean.toString(folder.ignoreDelete)); // Update devices that share this folder. @@ -1003,7 +1001,6 @@ public class ConfigXml { folder.setAttribute("type", Constants.FOLDER_TYPE_SEND_ONLY); folder.setAttribute("fsWatcherEnabled", Boolean.toString(defaultFolder.fsWatcherEnabled)); folder.setAttribute("fsWatcherDelayS", Integer.toString(defaultFolder.fsWatcherDelayS)); - setConfigElement(folder, "useLargeBlocks", Boolean.toString(defaultFolder.useLargeBlocks)); return true; } diff --git a/app/src/main/res/layout/activity_folder.xml b/app/src/main/res/layout/activity_folder.xml index 652bd6bd..cb78c7e2 100644 --- a/app/src/main/res/layout/activity_folder.xml +++ b/app/src/main/res/layout/activity_folder.xml @@ -281,39 +281,6 @@ - - - - - - - - - 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. - Ignore Delete Expert option that affects the handling of incoming index updates. When set, incoming updates with the delete flag set are ignored. See &folder_ignore_delete_docs_url;