mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Send update of share permissions in reshared remote shares
This commit is contained in:
parent
9f51a01c82
commit
bc353af37e
1 changed files with 17 additions and 7 deletions
|
@ -256,16 +256,25 @@ public class EditShareFragment extends Fragment {
|
||||||
boolean isFederated = ShareType.FEDERATED.equals(mShare.getShareType());
|
boolean isFederated = ShareType.FEDERATED.equals(mShare.getShareType());
|
||||||
if (mFile.isFolder()) {
|
if (mFile.isFolder()) {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
for (int i = 0; i < sSubordinateCheckBoxIds.length; i++) {
|
if (!isFederated) {
|
||||||
//noinspection ConstantConditions, prevented in the method beginning
|
/// not federated shares -> enable all the subpermisions
|
||||||
subordinate = (CompoundButton) getView().findViewById(sSubordinateCheckBoxIds[i]);
|
for (int i = 0; i < sSubordinateCheckBoxIds.length; i++) {
|
||||||
if (!isFederated) {
|
//noinspection ConstantConditions, prevented in the method beginning
|
||||||
|
subordinate = (CompoundButton) getView().findViewById(sSubordinateCheckBoxIds[i]);
|
||||||
subordinate.setVisibility(View.VISIBLE);
|
subordinate.setVisibility(View.VISIBLE);
|
||||||
}
|
if (!subordinate.isChecked() &&
|
||||||
if (!subordinate.isChecked() &&
|
|
||||||
!mFile.isSharedWithMe()) { // see (1)
|
!mFile.isSharedWithMe()) { // see (1)
|
||||||
|
toggleDisablingListener(subordinate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/// federated share -> enable delete subpermission, as server side; TODO why?
|
||||||
|
//noinspection ConstantConditions, prevented in the method beginning
|
||||||
|
subordinate = (CompoundButton) getView().findViewById(R.id.canEditDeleteCheckBox);
|
||||||
|
if (!subordinate.isChecked()) {
|
||||||
toggleDisablingListener(subordinate);
|
toggleDisablingListener(subordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < sSubordinateCheckBoxIds.length; i++) {
|
for (int i = 0; i < sSubordinateCheckBoxIds.length; i++) {
|
||||||
|
@ -279,7 +288,8 @@ public class EditShareFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(mFile.isFolder() && isChecked && mFile.isSharedWithMe())) { // see (1)
|
if(!(mFile.isFolder() && isChecked && mFile.isSharedWithMe()) // see (1)
|
||||||
|
|| isFederated ) {
|
||||||
updatePermissionsToShare();
|
updatePermissionsToShare();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue