mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 05:05:31 +03:00
Merge pull request #9418 from nextcloud/fix/sharing-note-mandatory
Don't make note mandatory for sharing
This commit is contained in:
commit
451c629a44
3 changed files with 6 additions and 9 deletions
|
@ -491,13 +491,10 @@ class FileDetailsSharingProcessFragment : Fragment(), ExpirationDatePickerDialog
|
|||
* method to validate step 2 (note screen) information
|
||||
*/
|
||||
private fun validateShareProcessSecond() {
|
||||
if (TextUtils.isEmpty(binding.noteText.text.toString().trim())) {
|
||||
DisplayUtils.showSnackMessage(binding.root, R.string.share_link_empty_note_message)
|
||||
return
|
||||
}
|
||||
val noteText = binding.noteText.text.toString().trim()
|
||||
// if modifying existing share then directly update the note and send email
|
||||
if (share != null) {
|
||||
fileOperationsHelper?.updateNoteToShare(share, binding.noteText.text.toString().trim())
|
||||
if (share != null && share?.note != noteText) {
|
||||
fileOperationsHelper?.updateNoteToShare(share, noteText)
|
||||
} else {
|
||||
// else create new share
|
||||
fileOperationsHelper?.shareFileWithSharee(
|
||||
|
@ -509,7 +506,8 @@ class FileDetailsSharingProcessFragment : Fragment(), ExpirationDatePickerDialog
|
|||
.shareProcessHideDownloadCheckbox.isChecked,
|
||||
binding.shareProcessEnterPassword.text.toString().trim(),
|
||||
chosenExpDateInMills,
|
||||
binding.noteText.text.toString().trim(), binding.shareProcessChangeNameEt.text.toString().trim()
|
||||
noteText,
|
||||
binding.shareProcessChangeNameEt.text.toString().trim()
|
||||
)
|
||||
}
|
||||
removeCurrentFragment()
|
||||
|
|
|
@ -566,7 +566,7 @@ public class FileOperationsHelper {
|
|||
service.putExtra(OperationsService.EXTRA_SHARE_HIDE_FILE_DOWNLOAD, hideFileDownload);
|
||||
service.putExtra(OperationsService.EXTRA_SHARE_PASSWORD, (password == null) ? "" : password);
|
||||
service.putExtra(OperationsService.EXTRA_SHARE_EXPIRATION_DATE_IN_MILLIS, expirationTimeInMillis);
|
||||
service.putExtra(OperationsService.EXTRA_SHARE_NOTE, note);
|
||||
service.putExtra(OperationsService.EXTRA_SHARE_NOTE, (note == null) ? "" : note);
|
||||
service.putExtra(OperationsService.EXTRA_SHARE_PUBLIC_LABEL, (label == null) ? "" : label);
|
||||
|
||||
mWaitingForOpId = fileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
||||
|
|
|
@ -972,7 +972,6 @@
|
|||
<string name="common_next">Next</string>
|
||||
<string name="send_share">Send Share</string>
|
||||
<string name="no_share_permission_selected">Please select at least one permission to share.</string>
|
||||
<string name="share_link_empty_note_message">Please enter note.</string>
|
||||
<string name="share_copy_link">Share & Copy Link</string>
|
||||
<string name="set_note">Set Note</string>
|
||||
<string name="share_open_in">Open in…</string>
|
||||
|
|
Loading…
Reference in a new issue