Make services aot compatible.

This commit is contained in:
Burak Kaan Köse
2025-11-14 14:28:10 +01:00
parent d9ef81729f
commit 8cb8f27e00
8 changed files with 58 additions and 57 deletions
+4 -4
View File
@@ -99,7 +99,7 @@ public class MailService : BaseDatabaseService, IMailService
copy.ThreadId = draftCreationOptions.ReferencedMessage.MailCopy.ThreadId;
}
await Connection.InsertAsync(copy);
await Connection.InsertAsync(copy, typeof(MailCopy));
await _mimeFileService.SaveMimeMessageAsync(copy.FileId, createdDraftMimeMessage, composerAccount.Id);
@@ -527,7 +527,7 @@ public class MailService : BaseDatabaseService, IMailService
_logger.Debug("Inserting mail {MailCopyId} to {FolderName}", mailCopy.Id, mailCopy.AssignedFolder.FolderName);
await Connection.InsertAsync(mailCopy).ConfigureAwait(false);
await Connection.InsertAsync(mailCopy, typeof(MailCopy)).ConfigureAwait(false);
ReportUIChange(new MailAddedMessage(mailCopy));
}
@@ -543,7 +543,7 @@ public class MailService : BaseDatabaseService, IMailService
_logger.Debug("Updating mail {MailCopyId} with Folder {FolderId}", mailCopy.Id, mailCopy.FolderId);
await Connection.UpdateAsync(mailCopy).ConfigureAwait(false);
await Connection.UpdateAsync(mailCopy, typeof(MailCopy)).ConfigureAwait(false);
ReportUIChange(new MailUpdatedMessage(mailCopy));
}
@@ -559,7 +559,7 @@ public class MailService : BaseDatabaseService, IMailService
_logger.Debug("Deleting mail {Id} from folder {FolderName}", mailCopy.Id, mailCopy.AssignedFolder.FolderName);
await Connection.DeleteAsync(mailCopy).ConfigureAwait(false);
await Connection.DeleteAsync<MailCopy>(mailCopy).ConfigureAwait(false);
// If there are no more copies exists of the same mail, delete the MIME file as well.
var isMailExists = await IsMailExistsAsync(mailCopy.Id).ConfigureAwait(false);