Account attentions.

This commit is contained in:
Burak Kaan Köse
2025-11-14 12:12:13 +01:00
parent 6be271565e
commit 13cb3a1042
11 changed files with 70 additions and 42 deletions
+1
View File
@@ -12,6 +12,7 @@ public static class Constants
public const string ToastMailUniqueIdKey = nameof(ToastMailUniqueIdKey);
public const string ToastActionKey = nameof(ToastActionKey);
public const string ToastMailAccountIdKey = nameof(ToastMailAccountIdKey);
public const string ClientLogFile = "Client_.log";
public const string ServerLogFile = "Server_.log";
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Wino.Core.Domain.Entities.Mail;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Core.Domain.Interfaces;
@@ -22,4 +23,10 @@ public interface INotificationBuilder
/// Removes the toast notification for a specific mail by unique id.
/// </summary>
void RemoveNotification(Guid mailUniqueId);
/// <summary>
/// Shows a notification that the account requires attention.
/// </summary>
/// <param name="account">Account that needs attention.</param>
void CreateAttentionRequiredNotification(MailAccount account);
}
@@ -41,11 +41,6 @@ public interface ISynchronizationManager
/// </summary>
bool IsAccountSynchronizing(Guid accountId);
/// <summary>
/// Queues a mail action request to the corresponding account's synchronizer.
/// </summary>
Task QueueRequestAsync(IRequestBase request, Guid accountId);
/// <summary>
/// Queues a mail action request to the corresponding account's synchronizer with optional synchronization triggering.
/// </summary>
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Wino.Core.Domain.Entities.Mail;
using Wino.Core.Domain.Enums;
@@ -22,6 +23,8 @@ public class MailSynchronizationResult
public SynchronizationCompletedState CompletedState { get; set; }
public Exception Exception { get; set; }
public static MailSynchronizationResult Empty => new() { CompletedState = SynchronizationCompletedState.Success };
// Mail synchronization
@@ -41,5 +44,9 @@ public class MailSynchronizationResult
};
public static MailSynchronizationResult Canceled => new() { CompletedState = SynchronizationCompletedState.Canceled };
public static MailSynchronizationResult Failed => new() { CompletedState = SynchronizationCompletedState.Failed };
public static MailSynchronizationResult Failed(Exception exception) => new()
{
CompletedState = SynchronizationCompletedState.Failed,
Exception = exception
};
}
@@ -47,6 +47,7 @@
"BasicIMAPSetupDialog_Title": "IMAP Account",
"Busy": "Busy",
"Buttons_AddAccount": "Add Account",
"Buttons_FixAccount": "Fix Account",
"Buttons_AddNewAlias": "Add New Alias",
"Buttons_Allow": "Allow",
"Buttons_ApplyTheme": "Apply Theme",
@@ -172,6 +173,8 @@
"ElementTheme_Light": "Light mode",
"Emoji": "Emoji",
"Error_FailedToSetupSystemFolders_Title": "Failed to setup system folders",
"Exception_AccountNeedsAttention_Title": "Account needs attention",
"Exception_AccountNeedsAttention_Message": "'{0}' requires your attention to continue working.",
"Exception_AuthenticationCanceled": "Authentication canceled",
"Exception_CustomThemeExists": "This theme already exists.",
"Exception_CustomThemeMissingName": "You must provide a name.",