Handle create, change and delete options in federated sharing in servers 9.1 or up

# Conflicts:
#	src/com/owncloud/android/ui/fragment/EditShareFragment.java
This commit is contained in:
jabarros 2016-09-20 12:09:08 +02:00 committed by AndyScherzinger
parent c219152db5
commit 0e7496c233
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -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);