Bunch of improvements i dunno.
This commit is contained in:
@@ -797,6 +797,9 @@ public class MailService : BaseDatabaseService, IMailService
|
||||
public Task<int> GetMailItemQueueCountAsync(Guid accountId)
|
||||
=> Connection.Table<MailItemQueue>().Where(a => a.AccountId == accountId).CountAsync();
|
||||
|
||||
public Task<int> GetMailItemQueueCountByFolderAsync(Guid accountId, string remoteFolderId)
|
||||
=> Connection.Table<MailItemQueue>().Where(a => a.AccountId == accountId && a.RemoteFolderId == remoteFolderId).CountAsync();
|
||||
|
||||
public Task UpdateMailItemQueueAsync(IEnumerable<MailItemQueue> queueItems)
|
||||
{
|
||||
if (queueItems == null || !queueItems.Any())
|
||||
@@ -824,6 +827,16 @@ public class MailService : BaseDatabaseService, IMailService
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
public Task<List<MailItemQueue>> GetMailItemQueueByFolderAsync(Guid accountId, string remoteFolderId, int take)
|
||||
{
|
||||
// For Outlook per-folder sync
|
||||
return Connection.Table<MailItemQueue>()
|
||||
.Where(a => a.AccountId == accountId && a.RemoteFolderId == remoteFolderId && !a.IsProcessed)
|
||||
.OrderBy(a => a.CreatedAt)
|
||||
.Take(take)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private async Task<MimeMessage> CreateDraftMimeAsync(MailAccount account, DraftCreationOptions draftCreationOptions)
|
||||
|
||||
Reference in New Issue
Block a user