From: tobiasKaminsky Date: Fri, 25 Sep 2015 15:51:52 +0000 (+0200) Subject: wip X-Git-Tag: beta-20151122~11^2~6 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/fb46e9801c5ae4749271820747cbe71fc910d230?ds=inline;hp=--cc wip --- fb46e9801c5ae4749271820747cbe71fc910d230 diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index fc18dd3a..fc490790 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -167,37 +167,37 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi @Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { - Bundle args = getArguments(); - boolean allowContextualActions = - (args == null) ? true : args.getBoolean(ARG_ALLOW_CONTEXTUAL_ACTIONS, true); - if (allowContextualActions) { - MenuInflater inflater = getActivity().getMenuInflater(); - inflater.inflate(R.menu.file_actions_menu, menu); - AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo; - OCFile targetFile = (OCFile) mAdapter.getItem(info.position); - - if (mContainerActivity.getStorageManager() != null) { - FileMenuFilter mf = new FileMenuFilter( - targetFile, - mContainerActivity.getStorageManager().getAccount(), - mContainerActivity, - getActivity() - ); - mf.filter(menu); - } - - /// TODO break this direct dependency on FileDisplayActivity... if possible - MenuItem item = menu.findItem(R.id.action_open_file_with); - FileFragment frag = ((FileDisplayActivity)getActivity()).getSecondFragment(); - if (frag != null && frag instanceof FileDetailFragment && - frag.getFile().getFileId() == targetFile.getFileId()) { - item = menu.findItem(R.id.action_see_details); - if (item != null) { - item.setVisible(false); - item.setEnabled(false); - } - } - } +// Bundle args = getArguments(); +// boolean allowContextualActions = +// (args == null) ? true : args.getBoolean(ARG_ALLOW_CONTEXTUAL_ACTIONS, true); +// if (allowContextualActions) { +// MenuInflater inflater = getActivity().getMenuInflater(); +// inflater.inflate(R.menu.file_actions_menu, menu); +// AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo; +// OCFile targetFile = (OCFile) mAdapter.getItem(info.position); +// +// if (mContainerActivity.getStorageManager() != null) { +// FileMenuFilter mf = new FileMenuFilter( +// targetFile, +// mContainerActivity.getStorageManager().getAccount(), +// mContainerActivity, +// getActivity() +// ); +// mf.filter(menu); +// } +// +// /// TODO break this direct dependency on FileDisplayActivity... if possible +// MenuItem item = menu.findItem(R.id.action_open_file_with); +// FileFragment frag = ((FileDisplayActivity)getActivity()).getSecondFragment(); +// if (frag != null && frag instanceof FileDetailFragment && +// frag.getFile().getFileId() == targetFile.getFileId()) { +// item = menu.findItem(R.id.action_see_details); +// if (item != null) { +// item.setVisible(false); +// item.setEnabled(false); +// } +// } +// } mode.getMenuInflater().inflate(R.menu.file_actions_menu, menu); return true;