Stub
This commit is contained in:
@@ -12,9 +12,9 @@ using Microsoft.UI.Xaml.Media;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Text;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.WinUI.Controls;
|
||||
|
||||
namespace Wino.Helpers;
|
||||
@@ -104,9 +104,9 @@ public static class XamlHelpers
|
||||
public static Color GetWindowsColorFromHex(string hex) => hex.ToColor();
|
||||
|
||||
public static SolidColorBrush GetSolidColorBrushFromHex(string colorHex) => string.IsNullOrEmpty(colorHex) ? new SolidColorBrush(Colors.Transparent) : new SolidColorBrush(colorHex.ToColor());
|
||||
public static Visibility IsSelectionModeMultiple(ListViewSelectionMode mode) => mode == ListViewSelectionMode.Multiple ? Visibility.Visible : Visibility.Collapsed;
|
||||
public static FontWeight GetFontWeightBySyncState(bool isSyncing) => isSyncing ? FontWeights.SemiBold : FontWeights.Normal;
|
||||
public static FontWeight GetFontWeightByChildSelectedState(bool isChildSelected) => isChildSelected ? FontWeights.SemiBold : FontWeights.Normal;
|
||||
public static FontWeight GetFontWeightByReadState(bool isChildSelected) => isChildSelected ? FontWeights.Normal : FontWeights.SemiBold;
|
||||
public static Visibility StringToVisibilityConverter(string value) => string.IsNullOrWhiteSpace(value) ? Visibility.Collapsed : Visibility.Visible;
|
||||
public static Visibility StringToVisibilityReversedConverter(string value) => string.IsNullOrWhiteSpace(value) ? Visibility.Visible : Visibility.Collapsed;
|
||||
public static string GetMailItemDisplaySummaryForListing(bool isDraft, DateTime receivedDate, bool prefer24HourTime)
|
||||
@@ -135,7 +135,7 @@ public static class XamlHelpers
|
||||
// From regular mail header template
|
||||
if (groupObject is DateTime groupedDate)
|
||||
dateObject = groupedDate;
|
||||
else if (groupObject is IGrouping<object, IMailItem> groupKey)
|
||||
else if (groupObject is IGrouping<object, MailCopy> groupKey)
|
||||
{
|
||||
// From semantic group header.
|
||||
dateObject = groupKey.Key;
|
||||
|
||||
@@ -12,7 +12,6 @@ using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Messaging.UI;
|
||||
|
||||
namespace Wino.Core.WinUI.Services;
|
||||
@@ -45,7 +44,7 @@ public class NotificationBuilder : INotificationBuilder
|
||||
});
|
||||
}
|
||||
|
||||
public async Task CreateNotificationsAsync(Guid inboxFolderId, IEnumerable<IMailItem> downloadedMailItems)
|
||||
public async Task CreateNotificationsAsync(Guid inboxFolderId, IEnumerable<MailCopy> downloadedMailItems)
|
||||
{
|
||||
var mailCount = downloadedMailItems.Count();
|
||||
|
||||
@@ -70,7 +69,7 @@ public class NotificationBuilder : INotificationBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
var validItems = new List<IMailItem>();
|
||||
var validItems = new List<MailCopy>();
|
||||
|
||||
// Fetch mails again to fill up assigned folder data and latest statuses.
|
||||
// They've been marked as read by executing synchronizer tasks until inital sync finishes.
|
||||
@@ -220,17 +219,17 @@ public class NotificationBuilder : INotificationBuilder
|
||||
public async Task CreateTestNotificationAsync(string title, string message)
|
||||
{
|
||||
// with args test.
|
||||
await CreateNotificationsAsync(Guid.Parse("28c3c39b-7147-4de3-b209-949bd19eede6"), new List<IMailItem>()
|
||||
{
|
||||
new MailCopy()
|
||||
{
|
||||
Subject = "test subject",
|
||||
PreviewText = "preview html",
|
||||
CreationDate = DateTime.UtcNow,
|
||||
FromAddress = "bkaankose@outlook.com",
|
||||
Id = "AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0AnMdP0zg8wkS_Ib2Eeh80LAAGq91I3QAA",
|
||||
}
|
||||
});
|
||||
//await CreateNotificationsAsync(Guid.Parse("28c3c39b-7147-4de3-b209-949bd19eede6"), new List<IMailItem>()
|
||||
//{
|
||||
// new MailCopy()
|
||||
// {
|
||||
// Subject = "test subject",
|
||||
// PreviewText = "preview html",
|
||||
// CreationDate = DateTime.UtcNow,
|
||||
// FromAddress = "bkaankose@outlook.com",
|
||||
// Id = "AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0AnMdP0zg8wkS_Ib2Eeh80LAAGq91I3QAA",
|
||||
// }
|
||||
//});
|
||||
|
||||
//var builder = new ToastContentBuilder();
|
||||
//builder.SetToastScenario(ToastScenario.Default);
|
||||
|
||||
@@ -197,7 +197,7 @@ public class ThemeService : IThemeService
|
||||
// UpdateSystemCaptionButtonColors();
|
||||
//});
|
||||
|
||||
NotifyThemeUpdate();
|
||||
// NotifyThemeUpdate();
|
||||
}
|
||||
|
||||
public void UpdateSystemCaptionButtonColors()
|
||||
|
||||
@@ -15,7 +15,6 @@ using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Requests;
|
||||
using Wino.Core.Domain.Models.Server;
|
||||
using Wino.Core.Integration.Json;
|
||||
using Wino.Messaging;
|
||||
using Wino.Messaging.Client.Connection;
|
||||
using Wino.Messaging.Enums;
|
||||
@@ -77,11 +76,6 @@ public class WinoServerConnectionManager :
|
||||
}
|
||||
}
|
||||
|
||||
private readonly JsonSerializerOptions _jsonSerializerOptions = new()
|
||||
{
|
||||
TypeInfoResolver = new ServerRequestTypeInfoResolver()
|
||||
};
|
||||
|
||||
public WinoServerConnectionManager()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Register(this);
|
||||
@@ -304,7 +298,7 @@ public class WinoServerConnectionManager :
|
||||
|
||||
try
|
||||
{
|
||||
serializedMessage = JsonSerializer.Serialize(message, _jsonSerializerOptions);
|
||||
serializedMessage = JsonSerializer.Serialize(message);
|
||||
}
|
||||
catch (Exception serializationException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user