-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Set downloads folder to group by date #9248
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
Conversation
sort direction = descending
We already have this logic in FolderSettingsViewModel 🤔 else if (folderPath == CommonPaths.DownloadsPath)
{
// Default for downloads folder is to group by date created
return new LayoutPreferences
{
...
DirectoryGroupOption = GroupOption.DateCreated,
};
} Doing it in ItemsViewModel would stop the user from changing it to something else. |
@gave92 I hadn't even noticed it 😅 |
Lol confused as well as to why that issue exists 😆 Could be there's an issue preventing it to work. Problem is you only notice it if you've never ever changed the layout/sorting in Downloads folder. Reinstalling Files may not reset it so it's not easy to test. |
Aaah found the issue, indeed that logic does not work. That's because we're passing a wrong path to be compared with the downloads folder path: |
So the solution is to remove this replace or replace with '/'? |
So changing "\" with "_" is done for a reason, that is LocalSettings throw error if you try to use a key/setting name that contains "\". We need to separate "ReadLayoutPreferencesFromSettings" which reads from LocalSettings and should use the paths with "_" from getting the default layout part that should use the "normal" path. |
But that means on line 355 it should be comparing with the '\' instead of the '_', right? |
@gave92 When you can, do the review, I think I found the solution. |
Resolved / Related Issues
Items resolved / related issues by this PR.
Details of Changes
Add details of changes here.
Validation
How did you test these changes?