Skip to content

Commit 5f47eec

Browse files
committed
add setCheckboxStates
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent db2dc63 commit 5f47eec

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class FileDetailsSharingProcessFragment :
189189
showShareProcessSecond()
190190
}
191191
implementClickEvents()
192-
192+
setCheckboxStates()
193193
themeView()
194194
}
195195

@@ -482,6 +482,16 @@ class FileDetailsSharingProcessFragment :
482482
}
483483
}
484484

485+
private fun setCheckboxStates() {
486+
binding.run {
487+
shareReadCheckbox.isChecked = (permission and OCShare.READ_PERMISSION_FLAG) != 0
488+
shareCreateCheckbox.isChecked = (permission and OCShare.CREATE_PERMISSION_FLAG) != 0
489+
shareEditCheckbox.isChecked = (permission and OCShare.UPDATE_PERMISSION_FLAG) != 0
490+
shareProcessAllowResharingCheckbox.isChecked = (permission and OCShare.SHARE_PERMISSION_FLAG) != 0
491+
shareDeleteCheckbox.isChecked = (permission and OCShare.DELETE_PERMISSION_FLAG) != 0
492+
}
493+
}
494+
485495
private fun showExpirationDateDialog(chosenDateInMillis: Long = chosenExpDateInMills) {
486496
val dialog = ExpirationDatePickerDialogFragment.newInstance(chosenDateInMillis)
487497
dialog.setOnExpiryDateListener(this)

0 commit comments

Comments
 (0)