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 a04de648..df09b778 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java @@ -112,6 +112,7 @@ public class FolderActivity extends SyncthingActivity { private TextView mVersioningDescriptionView; private TextView mVersioningTypeView; private SwitchCompat mVariableSizeBlocks; + private SwitchCompat mIgnoreDelete; private TextView mEditIgnoreListTitle; private EditText mEditIgnoreListContent; @@ -177,6 +178,10 @@ public class FolderActivity extends SyncthingActivity { mFolder.useLargeBlocks = isChecked; mFolderNeedsToUpdate = true; break; + case R.id.ignoreDelete: + mFolder.ignoreDelete = isChecked; + mFolderNeedsToUpdate = true; + break; } } }; @@ -208,6 +213,7 @@ public class FolderActivity extends SyncthingActivity { mVersioningDescriptionView = findViewById(R.id.versioningDescription); mVersioningTypeView = findViewById(R.id.versioningType); mVariableSizeBlocks = findViewById(R.id.variableSizeBlocks); + mIgnoreDelete = findViewById(R.id.ignoreDelete); mDevicesContainer = findViewById(R.id.devicesContainer); mEditIgnoreListTitle = findViewById(R.id.edit_ignore_list_title); mEditIgnoreListContent = findViewById(R.id.edit_ignore_list_content); @@ -458,6 +464,7 @@ public class FolderActivity extends SyncthingActivity { mFolderPaused.setOnCheckedChangeListener(null); mCustomSyncConditionsSwitch.setOnCheckedChangeListener(null); mVariableSizeBlocks.setOnCheckedChangeListener(null); + mIgnoreDelete.setOnCheckedChangeListener(null); // Update views mLabelView.setText(mFolder.label); @@ -468,6 +475,7 @@ public class FolderActivity extends SyncthingActivity { 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); // Update views - custom sync conditions. @@ -503,6 +511,7 @@ public class FolderActivity extends SyncthingActivity { mFolderPaused.setOnCheckedChangeListener(mCheckedListener); mCustomSyncConditionsSwitch.setOnCheckedChangeListener(mCheckedListener); mVariableSizeBlocks.setOnCheckedChangeListener(mCheckedListener); + mIgnoreDelete.setOnCheckedChangeListener(mCheckedListener); } @Override 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 3c8ff890..1829ba58 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -436,6 +436,7 @@ public class ConfigXml { 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), true); + folder.ignoreDelete = getContentOrDefault(r.getElementsByTagName("ignoreDelete").item(0), false); folder.copyOwnershipFromParent = getContentOrDefault(r.getElementsByTagName("copyOwnershipFromParent").item(0), false); // Devices @@ -532,6 +533,7 @@ public class ConfigXml { 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. // Pass 1: Remove all devices below that folder in XML except the local device. diff --git a/app/src/main/res/drawable-hdpi/ic_delete_forever_black_24.png b/app/src/main/res/drawable-hdpi/ic_delete_forever_black_24.png new file mode 100644 index 00000000..7a744ce7 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_delete_forever_black_24.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_delete_forever_black_24.png b/app/src/main/res/drawable-mdpi/ic_delete_forever_black_24.png new file mode 100644 index 00000000..71ad6d86 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_delete_forever_black_24.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_delete_forever_black_24.png b/app/src/main/res/drawable-xhdpi/ic_delete_forever_black_24.png new file mode 100644 index 00000000..af631104 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_delete_forever_black_24.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_delete_forever_black_24.png b/app/src/main/res/drawable-xxhdpi/ic_delete_forever_black_24.png new file mode 100644 index 00000000..1f04702e Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_delete_forever_black_24.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delete_forever_black_24.png b/app/src/main/res/drawable-xxxhdpi/ic_delete_forever_black_24.png new file mode 100644 index 00000000..33c06971 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_delete_forever_black_24.png differ diff --git a/app/src/main/res/layout/activity_folder.xml b/app/src/main/res/layout/activity_folder.xml index e589279e..652bd6bd 100644 --- a/app/src/main/res/layout/activity_folder.xml +++ b/app/src/main/res/layout/activity_folder.xml @@ -314,6 +314,39 @@ + + + + + + + + + + +]> + Syncthing-Fork @@ -210,6 +214,10 @@ Bitte melden Sie auftretende Probleme via GitHub. Variable Blockgröße Blöcke variabler Größe (auch \"große Blöcke\") sind effizienter für größere Dateien. Wenn Du dies für einen Ordner aktivierst, musst du es für diesen Ordner auf allen Geräten aktivieren. + + Löschen ignorieren + Expertenoption, die sich auf die Verarbeitung eingehender Indexaktualisierungen auswirkt. Wenn festgelegt, werden eingehende Aktualisierungen mit dem Löschkennzeichen ignoriert. Siehe &folder_ignore_delete_docs_url; + Ordner pausieren diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d4ec8501..2aa1bf9f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,8 @@ + +]> + Syncthing-Fork @@ -213,6 +217,10 @@ Please report any problems you encounter via Github. 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; + Pause Folder