Skip to content

Use database to store layout preferences #9437

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

Merged
merged 67 commits into from
Jun 26, 2022

Conversation

gave92
Copy link
Member

@gave92 gave92 commented Jun 19, 2022

Resolved / Related Issues
Items resolved / related issues by this PR.
I'm still thinking about this, opened to gather feedback mostly.
Pros:

  • Allows to do stuff like "Reset all layout modes", "Set layout for all folders", etc..
    These right know would require walking the HDD
  • Don't leave traces when app is uninstalled

Cons:

  • Reinstalling without exporting settings results in loss of layout prefs

Details of Changes
Add details of changes here.

  • Store layout preferences in database instead of ADS of the folder
  • Renaming or moving a folder preserves the layout mode
  • No user-facing changes in functionality

Validation
How did you test these changes?

  • Built and ran the app

gave92 and others added 30 commits May 9, 2022 21:47
This reverts commit 180dded.
@BanCrash
Copy link
Contributor

Thanks for the feedback. Could you confirm whether main behaves differently?

No, you are right, It have the same behaviour, so it's unrelated to this PR.

@gave92 gave92 marked this pull request as ready for review June 24, 2022 14:25
yaira2
yaira2 previously approved these changes Jun 24, 2022
@Laesx
Copy link

Laesx commented Jun 26, 2022

I much prefer the database way as well, because with the system as it currently stands it litters the folders a little too much and I have to put exceptions for my backups and for some other sync/file transfers, or when copying normally from explorer to say, an USB drive they get unhidden and are a pain.

You say there's an implementation to "set layout to all folders" I think it could be done a little like explorer does, if a folder mostly contains images it automatically selects that category for it and uses the layout you hasve set for that category to display it.

Or at least be able to set a certain view for a folder AND all its subfolders.

@gave92 gave92 requested a review from yaira2 June 26, 2022 13:57
@yaira2
Copy link
Member

yaira2 commented Jun 26, 2022

I think it could be done a little like explorer does, if a folder mostly contains images it automatically selects that category for it and uses the layout you hasve set for that category to display it.

@Laesx this is how the adaptive layout works but there is another option to turn off adaptive layout and to apply the same layout no matter what the contents are.

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Jun 26, 2022
@yaira2 yaira2 merged commit c0b17f3 into files-community:main Jun 26, 2022
@gave92 gave92 deleted the default_layout2 branch June 26, 2022 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants