2025-10-25 10:54:38 +02:00
|
|
|
using System;
|
2025-10-26 14:53:22 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
2025-10-25 10:54:38 +02:00
|
|
|
using Wino.Core.Domain.Interfaces;
|
|
|
|
|
|
|
|
|
|
namespace Wino.Mail.ViewModels.Data;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Common interface for mail items that can be displayed in a mail list.
|
|
|
|
|
/// Implemented by both MailItemViewModel and ThreadMailItemViewModel.
|
|
|
|
|
/// </summary>
|
2025-11-01 12:35:47 +01:00
|
|
|
public interface IMailListItem : IMailHashContainer, IMailListItemSorting, INotifyPropertyChanged
|
2025-10-25 10:54:38 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the latest creation date for sorting purposes.
|
|
|
|
|
/// For MailItemViewModel: the mail's creation date
|
|
|
|
|
/// For ThreadMailItemViewModel: the latest email's creation date
|
|
|
|
|
/// </summary>
|
|
|
|
|
DateTime CreationDate { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the sender's name for grouping purposes.
|
|
|
|
|
/// For MailItemViewModel: the mail's from name
|
|
|
|
|
/// For ThreadMailItemViewModel: the latest email's from name
|
|
|
|
|
/// </summary>
|
|
|
|
|
string FromName { get; }
|
2025-10-26 14:53:22 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets whether this item is selected.
|
|
|
|
|
/// For MailItemViewModel: returns IsSelected
|
|
|
|
|
/// For ThreadMailItemViewModel: returns IsSelected
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool IsSelected { get; set; }
|
|
|
|
|
|
2026-03-01 12:40:12 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets whether this item is currently processing a network operation.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool IsBusy { get; }
|
|
|
|
|
|
2025-10-26 14:53:22 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all selected mail items within this list item.
|
|
|
|
|
/// For MailItemViewModel: returns itself if IsSelected is true, otherwise empty
|
|
|
|
|
/// For ThreadMailItemViewModel: returns all selected emails within the thread
|
|
|
|
|
/// </summary>
|
|
|
|
|
IEnumerable<MailItemViewModel> GetSelectedMailItems();
|
2025-10-25 10:54:38 +02:00
|
|
|
}
|