Skip to content

Commit

Permalink
Hide send-share menu from 3 dot menu and hide see details menu from p…
Browse files Browse the repository at this point in the history
…review fragments.
  • Loading branch information
surinder-tsys committed Aug 5, 2024
1 parent cf222d4 commit 1e648a0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,11 @@ public void onOverflowIconClicked(OCFile file, View view) {

public void openActionsMenu(final int filesCount, final Set<OCFile> checkedFiles, final boolean isOverflow) {
throttler.run("overflowClick", () -> {
final List<Integer> additionalFilter = new ArrayList<>();
//need to hide the share menu because we have renamed another menu for sharing (NMC)
additionalFilter.add(R.id.action_send_share_file);
final FragmentManager childFragmentManager = getChildFragmentManager();
FileActionsBottomSheet.newInstance(filesCount, checkedFiles, isOverflow)
FileActionsBottomSheet.newInstance(filesCount, checkedFiles, isOverflow, additionalFilter)
.setResultListener(childFragmentManager, this, (id) -> {
onFileActionChosen(id, checkedFiles);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ class PreviewImageFragment : FileFragment(), Injectable {
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
// hide this option for NMC
R.id.action_see_details
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,9 @@ class PreviewMediaActivity :
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
// hide this option for NMC
R.id.action_see_details
)

if (getFile() != null && getFile().isSharedWithMe && !getFile().canReshare()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ class PreviewMediaFragment : FileFragment(), OnTouchListener, Injectable {
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
// hide this option for NMC
R.id.action_see_details
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ private void showFileActions(OCFile file) {
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
//hide this option for NMC
R.id.action_see_details
));
if (getFile() != null && getFile().isSharedWithMe() && !getFile().canReshare()) {
additionalFilter.add(R.id.action_send_share_file);
Expand Down

0 comments on commit 1e648a0

Please sign in to comment.