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

Sort folders alphabetically in special folders screen #7445

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

cketti
Copy link
Member

@cketti cketti commented Dec 19, 2023

No description provided.

@cketti cketti requested a review from wmontwe January 2, 2024 12:46
@@ -24,6 +24,10 @@ class GetSpecialFolderOptions(
?: error("No incoming server settings available")

val remoteFolders = folderFetcher.getFolders(serverSettings, authStateStorage)
.sortedWith(
compareByDescending<RemoteFolder> { it.type == FolderType.INBOX }
.thenBy(String.CASE_INSENSITIVE_ORDER) { it.displayName },
Copy link
Member

@wmontwe wmontwe Jan 2, 2024

Choose a reason for hiding this comment

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

This moves the INBOX to the first (effective third) position in the list of folders, why is that necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's done for consistency with the existing special folder preferences under Settings → [Account] → Folders. I believe we originally did this because that's also what we do in the folder list.

We can change the sort order later. Probably best to do it when we rewrite the settings screen. Then we can also share the logic to sort the list.

@wmontwe wmontwe self-requested a review January 3, 2024 09:52
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

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

👍

@cketti cketti merged commit d3c7ec3 into main Jan 3, 2024
2 checks passed
@cketti cketti deleted the special_folders_fix_2 branch January 3, 2024 12:14
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.

2 participants