Skip to content

fix: hide non-functional "Move to" action in the recycle bin#1086

Open
MiMoHo wants to merge 1 commit into
FossifyOrg:mainfrom
MiMoHo:fix/issue-692
Open

fix: hide non-functional "Move to" action in the recycle bin#1086
MiMoHo wants to merge 1 commit into
FossifyOrg:mainfrom
MiMoHo:fix/issue-692

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Jul 3, 2026

Copy link
Copy Markdown

Type of change(s)

  • Bug fix

What changed and why

In the fullscreen viewer (ViewPagerActivity), the overflow Move to item and the opt-in bottom-action Move button were shown even when viewing an item inside the recycle bin. Moving is not supported from the bin: tapping Move to calls copyMoveTo(), which detects currPath.startsWith(recycleBinPath) and only shows the toast "Moving recycle bin items is disabled. Please use Restore." before returning. So the action appeared functional but did nothing (this is the German toast shown in the issue screenshot).

This adds the missing !currentMedium.getIsInRecycleBin() guard to both the overflow item (menu_move_to) and the bottom-action Move button, matching the pattern already used by the neighbouring rename / hide / unhide / favorite items and the bottomRename / bottomFavorite buttons, and consistent with the grid CAB which already hides cab_move_to in the bin.

Copy to is intentionally left visible, because copying from the recycle bin is functional — copyMoveTo() blocks only the move operation.

Tests performed

Built the fossDebug variant and verified on an Android 15 (API 35) emulator:

Deleted an image to recycle bin; opened it fullscreen; overflow menu had NO 'Move to' (count 0) but had 'Copy to' and 'Restore this file'. Regression: opened a normal (non-bin) image fullscreen -> overflow HAS 'Move to' (count 1) plus 'Rename'.

Also confirmed detekt, lint, unit tests and the build all pass locally (CI-equivalent).

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator.
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

Coded with Opus 4.8 ultracode.

In the fullscreen viewer, the overflow "Move to" item and the opt-in
bottom-action Move button were shown for recycle-bin items, but moving
is disabled from the bin (copyMoveTo only shows a "use Restore" toast).
Guard both with !getIsInRecycleBin(), matching the adjacent rename/hide/
favorite items and the grid CAB, which already hide move in the bin.
Copy stays visible since copying from the bin is functional.
@MiMoHo MiMoHo requested a review from naveensingh as a code owner July 3, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"move to" in recycle bin should be hidden or grayed out

1 participant