From 0e7496c2332db34daf393322e1eac1243374f943 Mon Sep 17 00:00:00 2001 From: jabarros Date: Tue, 20 Sep 2016 12:09:08 +0200 Subject: [PATCH] Handle create, change and delete options in federated sharing in servers 9.1 or up # Conflicts: # src/com/owncloud/android/ui/fragment/EditShareFragment.java --- .../owncloud/android/ui/fragment/EditShareFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java b/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java index 3b1653d835..b13dd95462 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java @@ -174,19 +174,19 @@ public class EditShareFragment extends Fragment { boolean areEditOptionsAvailable = !isFederated || isNotReshareableFederatedSupported; if (mFile.isFolder() && areEditOptionsAvailable) { - /// TODO change areEditOptionsAvailable in order to delete !isFederated + /// TODO change areEditOptionsAllowed in order to delete !isFederated // from checking when iOS is ready compound = (CompoundButton) editShareView.findViewById(R.id.canEditCreateCheckBox); compound.setChecked((sharePermissions & OCShare.CREATE_PERMISSION_FLAG) > 0); - compound.setVisibility((canEdit) ? View.VISIBLE : View.GONE); + compound.setVisibility((canEdit && areEditOptionsAvailable) ? View.VISIBLE : View.GONE); compound = (CompoundButton) editShareView.findViewById(R.id.canEditChangeCheckBox); compound.setChecked((sharePermissions & OCShare.UPDATE_PERMISSION_FLAG) > 0); - compound.setVisibility((canEdit) ? View.VISIBLE : View.GONE); + compound.setVisibility((canEdit && areEditOptionsAvailable) ? View.VISIBLE : View.GONE); compound = (CompoundButton) editShareView.findViewById(R.id.canEditDeleteCheckBox); compound.setChecked((sharePermissions & OCShare.DELETE_PERMISSION_FLAG) > 0); - compound.setVisibility((canEdit) ? View.VISIBLE : View.GONE); + compound.setVisibility((canEdit && areEditOptionsAvailable) ? View.VISIBLE : View.GONE); } setPermissionsListening(editShareView, true);