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
/
PreviewImageFragment.java
diff --git
a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java
b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java
index
e7c497e
..
c6d9825
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
@@
-229,6
+229,11
@@
public class PreviewImageFragment extends FileFragment implements OnRemoteOper
toHide.add(R.id.action_cancel_upload);
toHide.add(R.id.action_download_file);
toHide.add(R.id.action_rename_file); // by now
toHide.add(R.id.action_cancel_upload);
toHide.add(R.id.action_download_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);
for (int i : toHide) {
item = menu.findItem(i);
@@
-272,16
+277,6
@@
public class PreviewImageFragment extends FileFragment implements OnRemoteOper
@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);
- }
- }
}
}