projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes from comments in PR #385
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
preview
/
PreviewMediaFragment.java
diff --git
a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
index
1de8bb1
..
d68332e
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
@@
-289,7
+289,12
@@
public class PreviewMediaFragment extends FileFragment implements
toHide.add(R.id.action_download_file);
toHide.add(R.id.action_sync_file);
toHide.add(R.id.action_rename_file); // by now
toHide.add(R.id.action_download_file);
toHide.add(R.id.action_sync_file);
toHide.add(R.id.action_rename_file); // by now
-
+
+ // Options shareLink
+ if (!getFile().isShareByLink()) {
+ toHide.add(R.id.action_unshare_file);
+ }
+
for (int i : toHide) {
item = menu.findItem(i);
if (item != null) {
for (int i : toHide) {
item = menu.findItem(i);
if (item != null) {
@@
-331,16
+336,6
@@
public class PreviewMediaFragment extends FileFragment implements
@Override
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
@Override
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
-
- List<Integer> toHide = new ArrayList<Integer>();
- MenuItem item = null;
- for (int i : toHide) {
- item = (MenuItem) menu.findItem(i);
- if (item != null) {
- item.setVisible(false);
- item.setEnabled(false);
- }
- }
}
}