Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Recent files doesn't display recent files #3991

Open
XYIheng opened this issue Nov 22, 2023 · 1 comment · May be fixed by #4067
Open

Bug: Recent files doesn't display recent files #3991

XYIheng opened this issue Nov 22, 2023 · 1 comment · May be fixed by #4067
Labels
Issue-Bug Related unexpected behavior or something worth investigating.
Milestone

Comments

@XYIheng
Copy link

XYIheng commented Nov 22, 2023

Describe the bug
Recent files doesn't display recent files
Add or modify files, then open "Recent files" in the drawer. The files that just modified doesn't display

To Reproduce
Steps to reproduce the behavior:

  1. add or modify any files, e.g., "123.txt"
  2. Open "Recent files"
  3. See error

Expected behavior
The files that just modified should display

Screenshots

Smartphone (please complete the following information):

  • Device: [e.g. Google Pixel 2]
  • OS: [Android 8]
  • Rooted: [No]
  • Version: [3.8.4]
@VishnuSanal VishnuSanal added Issue-Task (low) This isn't a bug, but should be dealt with. Issue-Bug Related unexpected behavior or something worth investigating. and removed Issue-Task (low) This isn't a bug, but should be dealt with. labels Nov 22, 2023
professional-lalit pushed a commit to professional-lalit/AmazeFileManager that referenced this issue Jan 30, 2024
RCA -

There was a check in `LoadFilesListTask.listRecentFiles()` that only list the file if it is not directory, which is not a case if file is not created in `storage/emulated0/` directory. The recently changed file would always come wrapped in some folder if created in a directory other than `storage/emulated0/`. Which was causing this issue.

Resolution -

In the solution provided it is assumed that we have to only show the files that were modified, hence, only modified/created files are listed and not the folders (as the title suggests ‘Recent Files’).
Here, if the file is wrapped in a directory, the directory is recursively explored to check the files it contains.
As we loop around recursively we go on adding the files that we find in a final list that is to be returned.

In this code, every file that comes from cursor will always be wrapped in some folder and it will be explored recursively and listed.
@professional-lalit professional-lalit linked a pull request Jan 30, 2024 that will close this issue
3 tasks
@professional-lalit
Copy link

@VishnuSanal created a PR for this issue;
#4067

@VishalNehra VishalNehra added this to the v4.0 milestone Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Related unexpected behavior or something worth investigating.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants