merge communication branch
This commit is contained in:
15
Wino.Core.Domain/Models/MailItem/IMailHashContainer.cs
Normal file
15
Wino.Core.Domain/Models/MailItem/IMailHashContainer.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Core.Domain.Models.MailItem
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface that returns the UniqueId store for IMailItem.
|
||||
/// For threads, it may be multiple items.
|
||||
/// For single mails, it'll always be one item.
|
||||
/// </summary>
|
||||
public interface IMailHashContainer
|
||||
{
|
||||
IEnumerable<Guid> GetContainingIds();
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ namespace Wino.Core.Domain.Models.MailItem
|
||||
/// <summary>
|
||||
/// Interface of simplest representation of a MailCopy.
|
||||
/// </summary>
|
||||
public interface IMailItem
|
||||
public interface IMailItem : IMailHashContainer
|
||||
{
|
||||
Guid UniqueId { get; }
|
||||
string Id { get; }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Wino.Core.Domain.Entities;
|
||||
@@ -40,6 +41,8 @@ namespace Wino.Core.Domain.Models.MailItem
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Guid> GetContainingIds() => ThreadItems?.Select(a => a.UniqueId) ?? default;
|
||||
|
||||
#region IMailItem
|
||||
|
||||
public Guid UniqueId => LatestMailItem?.UniqueId ?? Guid.Empty;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Requests
|
||||
namespace Wino.Core.Domain.Models.MailItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a single rule for toggling user actions if needed.
|
||||
16
Wino.Core.Domain/Models/Reader/WebViewMessage.cs
Normal file
16
Wino.Core.Domain/Models/Reader/WebViewMessage.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Reader
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to pass messages from the webview to the app.
|
||||
/// </summary>
|
||||
public class WebViewMessage
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("value")]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace Wino.Core.Domain.Models.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for all messages to report UI changes from synchronizers to UI.
|
||||
/// None of these messages can't run a code that manipulates database.
|
||||
/// They are sent either from processor or view models to signal some other
|
||||
/// parts of the application.
|
||||
/// </summary>
|
||||
public interface IUIMessage;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Wino.Core.Domain.Models.Requests
|
||||
{
|
||||
// Used to pass messages from the webview to the app.
|
||||
public class WebViewMessage
|
||||
{
|
||||
public string type { get; set; }
|
||||
public string value { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user