Merge pull request #973 from owncloud/delete_share_option_in_app

Make share feature configurable
This commit is contained in:
David A. Velasco 2015-05-08 14:55:07 +02:00
commit 47343ca299
2 changed files with 6 additions and 4 deletions

View file

@ -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 -->

View file

@ -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);