Skip to content

Commit 49e54bb

Browse files
committed
fix order
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent fe275b2 commit 49e54bb

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ public void onQuickPermissionChanged(OCShare share, int permission) {
693693

694694
@Override
695695
public void openShareDetail(OCShare share) {
696-
modifyExistingShare(share, FileDetailsSharingProcessFragment.SCREEN_TYPE_PERMISSION);
696+
modifyExistingShare(share, FileDetailsSharingProcessFragment.SCREEN_TYPE_CUSTOM_PERMISSION);
697697
}
698698

699699
//launcher for contact permission

app/src/main/java/com/owncloud/android/ui/fragment/FileDetailsSharingProcessFragment.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ 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
7475

7576
/**
7677
* fragment instance to be called while creating new share for internal and external share
@@ -187,11 +188,12 @@ class FileDetailsSharingProcessFragment :
187188

188189
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
189190
super.onViewCreated(view, savedInstanceState)
190-
if (shareProcessStep == SCREEN_TYPE_PERMISSION) {
191+
if (shareProcessStep == SCREEN_TYPE_PERMISSION || shareProcessStep == SCREEN_TYPE_CUSTOM_PERMISSION) {
191192
showShareProcessFirst()
192193
} else {
193194
showShareProcessSecond()
194195
}
196+
195197
implementClickEvents()
196198
setCheckboxStates()
197199
themeView()
@@ -296,7 +298,11 @@ class FileDetailsSharingProcessFragment :
296298
fileDropRadioButton.isChecked = true
297299
} else if (SharingMenuHelper.isReadOnly(share)) {
298300
viewOnlyRadioButton.isChecked = true
299-
} else if (sharePermissionManager.isCustomPermission(share)) {
301+
}
302+
303+
if (sharePermissionManager.isCustomPermission(share) ||
304+
shareProcessStep == SCREEN_TYPE_CUSTOM_PERMISSION)
305+
{
300306
customPermissionRadioButton.isChecked = true
301307
customPermissionLayout.setVisibilityWithAnimation(true)
302308
}

0 commit comments

Comments
 (0)