Skip to content

Fix search not working in drawer category views#4586

Open
geoffreysisco wants to merge 1 commit intoTeamAmaze:release/4.0from
geoffreysisco:fix/drawer-search-not-working
Open

Fix search not working in drawer category views#4586
geoffreysisco wants to merge 1 commit intoTeamAmaze:release/4.0from
geoffreysisco:fix/drawer-search-not-working

Conversation

@geoffreysisco
Copy link
Copy Markdown
Contributor

Description

Drawer categories (Quick Access, Recent Files, Images, Videos, Audio,
Documents, APKs, Trash Bin) use numeric paths ("0"–"7") instead of real
filesystem directories.

BasicSearch expects a filesystem path, so searches silently returned no
results when run from these views.

When the current view uses OpenMode.CUSTOM or OpenMode.TRASH_BIN,
search now runs against the visible dataset
(MainFragmentViewModel.listElements) instead of the filesystem.

Issue tracker

Fixes #4561

Automatic tests

  • Added test cases

Manual tests

  • Done

Device: Pixel 9 Pro (emulator)
OS: Android 16 (API 36)
Rooted: No
Build: debug

Verified search in:

  • Recent Files
  • Images
  • Videos
  • Audio
  • Documents
  • APKs
  • Trash Bin
  • Normal directory view

Could not verify:

  • Quick Access (no items available to search)

Build tasks success

Successfully running following tasks locally:

  • ./gradlew assembleDebug
  • ./gradlew spotlessCheck

Drawer categories (Quick Access, Recent Files, Images, Videos,
Audio, Documents, APKs, Trash Bin) use numeric paths ("0"–"7")
instead of real filesystem directories.

BasicSearch expects a filesystem path, so searches silently returned
no results when run from these views.

When the current view uses OpenMode.CUSTOM or OpenMode.TRASH_BIN,
search now runs against the visible dataset
(MainFragmentViewModel.listElements) instead of the filesystem.
@VishnuSanal VishnuSanal added the PR-Awaiting-Initial-Review this PR is awaiting for an initial review label Mar 21, 2026
Copy link
Copy Markdown
Member

@VishnuSanal VishnuSanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, LGTM 🚀 thanks for contributing to amaze :)

@VishnuSanal VishnuSanal added PR-Awaiting-Final-Review this PR is awaiting a final review/approval and removed PR-Awaiting-Initial-Review this PR is awaiting for an initial review labels Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Awaiting-Final-Review this PR is awaiting a final review/approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search not work in "Audios", "APKs", etc.

2 participants