Files
Wino-Mail/Wino.Core/Requests/Mail/CreateDraftRequest.cs
T

29 lines
922 B
C#
Raw Normal View History

2024-11-26 20:03:10 +01:00
using System;
using System.Collections.Generic;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.MailItem;
using Wino.Core.Domain.Models.Requests;
2025-02-16 11:54:23 +01:00
namespace Wino.Core.Requests.Mail;
public record CreateDraftRequest(DraftPreparationRequest DraftPreperationRequest)
: MailRequestBase(DraftPreperationRequest.CreatedLocalDraftCopy),
ICustomFolderSynchronizationRequest
2024-11-26 20:03:10 +01:00
{
2025-02-16 11:54:23 +01:00
public bool ExcludeMustHaveFolders => false;
2025-02-15 12:53:32 +01:00
2025-02-16 11:54:23 +01:00
public List<Guid> SynchronizationFolderIds =>
[
DraftPreperationRequest.CreatedLocalDraftCopy.AssignedFolder.Id
];
2024-11-26 20:03:10 +01:00
2025-02-16 11:54:23 +01:00
public override MailSynchronizerOperation Operation => MailSynchronizerOperation.CreateDraft;
2024-11-26 20:03:10 +01:00
2025-02-16 11:54:23 +01:00
public override void RevertUIChanges()
{
// Keep local draft intact when create-draft synchronization fails.
// This allows users to retry sending the local draft to the server.
2024-11-26 20:03:10 +01:00
}
}