mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Merge pull request #973 from owncloud/delete_share_option_in_app
Make share feature configurable
This commit is contained in:
commit
47343ca299
2 changed files with 6 additions and 4 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
<!-- Flags to enable/disable some features -->
|
||||
<string name = "send_files_to_other_apps">on</string>
|
||||
<string name = "share_feature">on</string>
|
||||
|
||||
|
||||
<!-- Colors -->
|
||||
|
|
|
@ -216,7 +216,9 @@ public class FileMenuFilter {
|
|||
|
||||
// SHARE FILE
|
||||
// TODO add check on SHARE available on server side?
|
||||
if (mFile == null) {
|
||||
boolean shareAllowed = (mContext != null &&
|
||||
mContext.getString(R.string.share_feature).equalsIgnoreCase("on"));
|
||||
if (!shareAllowed || mFile == null) {
|
||||
toHide.add(R.id.action_share_file);
|
||||
} else {
|
||||
toShow.add(R.id.action_share_file);
|
||||
|
@ -224,13 +226,12 @@ public class FileMenuFilter {
|
|||
|
||||
// UNSHARE FILE
|
||||
// TODO add check on SHARE available on server side?
|
||||
if (mFile == null || !mFile.isShareByLink()) {
|
||||
if ( !shareAllowed || (mFile == null || !mFile.isShareByLink())) {
|
||||
toHide.add(R.id.action_unshare_file);
|
||||
} else {
|
||||
toShow.add(R.id.action_unshare_file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SEE DETAILS
|
||||
if (mFile == null || mFile.isFolder()) {
|
||||
toHide.add(R.id.action_see_details);
|
||||
|
|
Loading…
Reference in a new issue