Implemented cache reset for Gmail history id expiration. (#581)
This commit is contained in:
7
Wino.Core.Domain/Enums/AccountCacheResetReason.cs
Normal file
7
Wino.Core.Domain/Enums/AccountCacheResetReason.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Core.Domain.Enums;
|
||||
|
||||
public enum AccountCacheResetReason
|
||||
{
|
||||
AccountRemoval,
|
||||
ExpiredCache
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
@@ -156,4 +157,11 @@ public interface IAccountService
|
||||
/// <returns>Primary alias for the account.</returns>
|
||||
Task<MailAccountAlias> GetPrimaryAccountAliasAsync(Guid accountId);
|
||||
Task<bool> IsAccountFocusedEnabledAsync(Guid accountId);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes mail cache in the database for the given account.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id.</param>
|
||||
/// <param name="AccountCacheResetReason">Reason for the cache reset.</param>
|
||||
Task DeleteAccountMailCacheAsync(Guid accountId, AccountCacheResetReason accountCacheResetReason);
|
||||
}
|
||||
|
||||
@@ -135,4 +135,10 @@ public interface IMailService
|
||||
/// <param name="package">Mail creation package.</param>
|
||||
/// <returns></returns>
|
||||
Task CreateMailRawAsync(MailAccount account, MailItemFolder mailItemFolder, NewMailItemPackage package);
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the account has any draft mail locally.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id.</param>
|
||||
Task<bool> HasAccountAnyDraftAsync(Guid accountId);
|
||||
}
|
||||
|
||||
@@ -66,4 +66,10 @@ public interface IMimeFileService
|
||||
/// <param name="mimeLocalPath">File path that physical MimeMessage is located.</param>
|
||||
/// <param name="options">Rendering options</param>
|
||||
MailRenderModel GetMailRenderModel(MimeMessage message, string mimeLocalPath, MailRenderingOptions options = null);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes every file in the mime cache for the given account.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id.</param>
|
||||
Task DeleteUserMimeCacheAsync(Guid accountId);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
"AccountAlias_Column_Verified": "Verified",
|
||||
"AccountAlias_Disclaimer_FirstLine": "Wino can only import aliases for your Gmail accounts.",
|
||||
"AccountAlias_Disclaimer_SecondLine": "If you want to use aliases for your Outlook or IMAP account, please add them yourself.",
|
||||
"AccountCacheReset_Title": "Account Cache Reset",
|
||||
"AccountCacheReset_Message": "This account requires full re-sychronization to continue working. Please wait while Wino re-synchronizes your messages...",
|
||||
"AccountContactNameYou": "You",
|
||||
"AccountCreationDialog_Completed": "all done",
|
||||
"AccountCreationDialog_FetchingEvents": "Fetching calendar events.",
|
||||
|
||||
Reference in New Issue
Block a user