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

Recent files doesn't display recent files #4067

Open
wants to merge 5 commits into
base: release/4.0
Choose a base branch
from

Conversation

professional-lalit
Copy link

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/emulated/0/. 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.

Description

Issue tracker

Fixes #3991

Manual tests

  • Done

  • Device: Android Studio Emulator

  • OS: Android 11 ("R") API 30

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

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 changed the title Bug: Recent files doesn't display recent files Recent files doesn't display recent files Jan 30, 2024
Copy link
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.

hi @professional-lalit thanks for your interest in contributing to amaze! it looks good to me, please address the review comments.

@VishnuSanal VishnuSanal added the pr-requested-changes this PR is awaiting an update from the author label Oct 13, 2024
@VishnuSanal
Copy link
Member

since this PR is long inactive, I am taking this PR over.

@VishnuSanal VishnuSanal self-assigned this Oct 13, 2024
@VishnuSanal VishnuSanal added pr-awaiting-initial-review this PR is awaiting for an initial review and removed pr-requested-changes this PR is awaiting an update from the author labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-awaiting-initial-review this PR is awaiting for an initial review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Recent files doesn't display recent files
2 participants