-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Feature - Add Custom Share Permissions #14729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /** | ||
| * get the permissions on the basis of selection | ||
| */ | ||
| private fun getSelectedPermission() = when { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need this function anymore. clickEvents assigns value for the permission
cbf504a to
c27d9ee
Compare
bf9eb82 to
5eae6b1
Compare
| /** | ||
| * Sets checked/visibility state on the given {@link MenuItem} based on the given criteria. | ||
| * | ||
| * @param menuItem the {@link MenuItem} to be setup | ||
| */ | ||
| public static void setupHideFileDownload(MenuItem menuItem, | ||
| boolean hideFileDownload, | ||
| boolean isFileDrop) { | ||
| if (isFileDrop) { | ||
| menuItem.setVisible(false); | ||
| } else { | ||
| menuItem.setVisible(true); | ||
| menuItem.setChecked(hideFileDownload); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * sets up the password {@link MenuItem}'s title based on the fact if a password is present. | ||
| * | ||
| * @param password the password {@link MenuItem} | ||
| * @param isPasswordProtected flag is a password is present | ||
| */ | ||
| public static void setupPasswordMenuItem(MenuItem password, boolean isPasswordProtected) { | ||
| if (isPasswordProtected) { | ||
| password.setTitle(R.string.share_password_title); | ||
| } else { | ||
| password.setTitle(R.string.share_no_password_title); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * sets up the expiration date {@link MenuItem}'s title based on the fact if an expiration date is present. | ||
| * | ||
| * @param expirationDate the expiration date {@link MenuItem} | ||
| * @param expirationDateValue the expiration date | ||
| * @param res Resources to load the corresponding strings. | ||
| */ | ||
| public static void setupExpirationDateMenuItem(MenuItem expirationDate, long expirationDateValue, Resources res) { | ||
| if (expirationDateValue > 0) { | ||
| expirationDate.setTitle(res.getString( | ||
| R.string.share_expiration_date_label, | ||
| SimpleDateFormat.getDateInstance().format(new Date(expirationDateValue)) | ||
| )); | ||
| } else { | ||
| expirationDate.setTitle(R.string.share_no_expiration_date_label); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused functions
3fcc813 to
1b1bc00
Compare
f1196f6 to
2aaa34d
Compare
12beb86 to
735ee0b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
a789b30 to
43fd840
Compare
4328310 to
a5a560a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
2dcf77e to
63df1a9
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
f9a902f to
6e5ade0
Compare
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14729.apk |

Library PR: nextcloud/android-library#1706