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:
@@ -0,0 +1,26 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Per-folder row shown on the Folder Customization page. Wraps the underlying
|
||||
/// <see cref="MailItemFolder"/> entity and exposes observable flags for binding.
|
||||
/// </summary>
|
||||
public partial class FolderCustomizationItemViewModel : ObservableObject
|
||||
{
|
||||
public MailItemFolder Folder { get; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool IsHidden { get; set; }
|
||||
|
||||
public string FolderName => Folder.FolderName;
|
||||
public bool IsSystemFolder => Folder.IsSystemFolder;
|
||||
public Core.Domain.Enums.SpecialFolderType SpecialFolderType => Folder.SpecialFolderType;
|
||||
|
||||
public FolderCustomizationItemViewModel(MailItemFolder folder)
|
||||
{
|
||||
Folder = folder;
|
||||
IsHidden = folder.IsHidden;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user