Skip to content

Commit 5ffa0d7

Browse files
committed
Hide send-share menu from 3 dot menu and hide see details menu from preview fragments.
1 parent def5dba commit 5ffa0d7

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,11 @@ public void onOverflowIconClicked(OCFile file, View view) {
612612

613613
public void openActionsMenu(final int filesCount, final Set<OCFile> checkedFiles, final boolean isOverflow) {
614614
throttler.run("overflowClick", () -> {
615+
final List<Integer> additionalFilter = new ArrayList<>();
616+
//need to hide the share menu because we have renamed another menu for sharing (NMC)
617+
additionalFilter.add(R.id.action_send_share_file);
615618
final FragmentManager childFragmentManager = getChildFragmentManager();
616-
FileActionsBottomSheet.newInstance(filesCount, checkedFiles, isOverflow)
619+
FileActionsBottomSheet.newInstance(filesCount, checkedFiles, isOverflow, additionalFilter)
617620
.setResultListener(childFragmentManager, this, (id) -> {
618621
onFileActionChosen(id, checkedFiles);
619622
})

‎app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ private void showFileActions(OCFile file) {
379379
R.id.action_copy,
380380
R.id.action_favorite,
381381
R.id.action_unset_favorite,
382-
R.id.action_pin_to_homescreen
382+
R.id.action_pin_to_homescreen,
383+
//hide this option for NMC
384+
R.id.action_see_details
383385
));
384386
if (getFile() != null && getFile().isSharedWithMe() && !getFile().canReshare()) {
385387
additionalFilter.add(R.id.action_send_share_file);

‎app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ private void showFileActions(OCFile file) {
428428
R.id.action_copy,
429429
R.id.action_favorite,
430430
R.id.action_unset_favorite,
431-
R.id.action_pin_to_homescreen
431+
R.id.action_pin_to_homescreen,
432+
//hide this option for NMC
433+
R.id.action_see_details
432434
));
433435
if (getFile() != null && getFile().isSharedWithMe() && !getFile().canReshare()) {
434436
additionalFilter.add(R.id.action_send_share_file);

‎app/src/main/java/com/owncloud/android/ui/preview/PreviewTextFileFragment.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ private void showFileActions(OCFile file) {
304304
R.id.action_copy,
305305
R.id.action_favorite,
306306
R.id.action_unset_favorite,
307-
R.id.action_pin_to_homescreen
307+
R.id.action_pin_to_homescreen,
308+
//hide this option for NMC
309+
R.id.action_see_details
308310
));
309311
if (getFile() != null && getFile().isSharedWithMe() && !getFile().canReshare()) {
310312
additionalFilter.add(R.id.action_send_share_file);

0 commit comments

Comments
 (0)