@@ -71,8 +71,6 @@ class FileDetailsSharingProcessFragment :
7171 // types of screens to be displayed
7272 const val SCREEN_TYPE_PERMISSION = 1 // permissions screen
7373 const val SCREEN_TYPE_NOTE = 2 // note screen
74- const val SCREEN_TYPE_CUSTOM_PERMISSION = 3 // custom permissions screen
75-
7674
7775 /* *
7876 * fragment instance to be called while creating new share for internal and external share
@@ -189,11 +187,7 @@ class FileDetailsSharingProcessFragment :
189187
190188 override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
191189 super .onViewCreated(view, savedInstanceState)
192- if (shareProcessStep == SCREEN_TYPE_PERMISSION || shareProcessStep == SCREEN_TYPE_CUSTOM_PERMISSION ) {
193- if (shareProcessStep == SCREEN_TYPE_CUSTOM_PERMISSION ) {
194- binding.customPermissionRadioButton.isChecked = true
195- }
196-
190+ if (shareProcessStep == SCREEN_TYPE_PERMISSION ) {
197191 showShareProcessFirst()
198192 } else {
199193 showShareProcessSecond()
@@ -295,16 +289,18 @@ class FileDetailsSharingProcessFragment :
295289 if (share?.isFolder == true ) updateViewForFolder() else updateViewForFile()
296290
297291 // custom permissions / read only / allow upload and editing / file drop
298- if (sharePermissionManager.isCustomPermission(share)) {
299- binding.customPermissionRadioButton.isChecked = true
300- binding.customPermissionLayout.setVisibilityWithAnimation(true )
301- } else if (SharingMenuHelper .isUploadAndEditingAllowed(share)) {
302- binding.editingRadioButton.isChecked = true
303- } else if (SharingMenuHelper .isFileDrop(share) && share?.isFolder == true ) {
304- binding.fileDropRadioButton.isChecked = true
305- } else if (SharingMenuHelper .isReadOnly(share)) {
306- binding.viewOnlyRadioButton.isChecked = true
307- } // TODO:
292+ binding.run {
293+ if (sharePermissionManager.isCustomPermission(share)) {
294+ customPermissionRadioButton.isChecked = true
295+ customPermissionLayout.setVisibilityWithAnimation(true )
296+ } else if (SharingMenuHelper .isUploadAndEditingAllowed(share)) {
297+ editingRadioButton.isChecked = true
298+ } else if (SharingMenuHelper .isFileDrop(share) && share?.isFolder == true ) {
299+ fileDropRadioButton.isChecked = true
300+ } else if (SharingMenuHelper .isReadOnly(share)) {
301+ viewOnlyRadioButton.isChecked = true
302+ }
303+ }
308304
309305 shareType = share?.shareType ? : ShareType .NO_SHARED
310306
0 commit comments