File tree Expand file tree Collapse file tree
app/src/main/java/com/owncloud/android/ui/fragment Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,19 +292,17 @@ class FileDetailsSharingProcessFragment :
292292
293293 // custom permissions / read only / allow upload and editing / file drop
294294 binding.run {
295- if (SharingMenuHelper .isUploadAndEditingAllowed(share)) {
296- editingRadioButton.isChecked = true
297- } else if (SharingMenuHelper .isFileDrop(share) && share?.isFolder == true ) {
298- fileDropRadioButton.isChecked = true
299- } else if (SharingMenuHelper .isReadOnly(share)) {
300- viewOnlyRadioButton.isChecked = true
301- }
302-
303- if (sharePermissionManager.isCustomPermission(share) ||
304- shareProcessStep == SCREEN_TYPE_CUSTOM_PERMISSION )
305- {
306- customPermissionRadioButton.isChecked = true
307- customPermissionLayout.setVisibilityWithAnimation(true )
295+ when {
296+ SharingMenuHelper .isUploadAndEditingAllowed(share) -> editingRadioButton.isChecked = true
297+ SharingMenuHelper .isFileDrop(share) && share?.isFolder == true -> fileDropRadioButton.isChecked = true
298+ SharingMenuHelper .isReadOnly(share) -> viewOnlyRadioButton.isChecked = true
299+ else -> {
300+ if (sharePermissionManager.isCustomPermission(share) ||
301+ shareProcessStep == SCREEN_TYPE_CUSTOM_PERMISSION ) {
302+ customPermissionRadioButton.isChecked = true
303+ customPermissionLayout.setVisibilityWithAnimation(true )
304+ }
305+ }
308306 }
309307 }
310308
You can’t perform that action at this time.
0 commit comments