Add per-account folder customization page (#855)

Introduce a dedicated settings page that lets users reorder, hide,
and pin/unpin folders per account. Folders are organized into Pinned,
Categories (Gmail only), and More sections with drag-to-reorder via
ListView. New Order column on MailItemFolder persists the custom
layout; the default sort falls back to alphabetic when no custom
order is set. A reset action wipes all customization in a single
transaction and restores system-folder stickiness.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Burak Kaan Köse
2026-04-16 14:07:17 +02:00
committed by GitHub
parent 0b136b3d66
commit 98eed39fe6
17 changed files with 599 additions and 10 deletions
@@ -22,6 +22,25 @@ public interface IFolderService
Task<int> GetFolderNotificationBadgeAsync(Guid folderId);
Task ChangeStickyStatusAsync(Guid folderId, bool isSticky);
/// <summary>
/// Toggles a folder's visibility in the navigation menu.
/// Hidden folders are still synchronized if sync is enabled.
/// </summary>
Task ChangeFolderHiddenStatusAsync(Guid folderId, bool isHidden);
/// <summary>
/// Persists a new custom ordering for the given folders.
/// The first id becomes Order=1, second Order=2, etc.
/// Caller is responsible for notifying the shell to refresh.
/// </summary>
Task UpdateFolderOrdersAsync(Guid accountId, IReadOnlyList<Guid> orderedFolderIds);
/// <summary>
/// Wipes every user folder customization for the account: clears custom Order,
/// un-hides folders, and restores IsSticky on system folders.
/// </summary>
Task ResetFolderCustomizationAsync(Guid accountId);
Task<MailAccount> UpdateSystemFolderConfigurationAsync(Guid accountId, SystemFolderConfiguration configuration);
Task ChangeFolderSynchronizationStateAsync(Guid folderId, bool isSynchronizationEnabled);
Task ChangeFolderShowUnreadCountStateAsync(Guid folderId, bool showUnreadCount);