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
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.
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.

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

1 participant