Geary.Smtp.ClientService: Pass a Geary.Email to sent-mail signal
Pass and email object to sent-mail so that we have access to one when notifying plugings of mail being sent and not need to convert/impement the RFC833 message to a Plugin.Email object.
This commit is contained in:
parent
1beea00d60
commit
2e623a5b78
2 changed files with 3 additions and 4 deletions
|
|
@ -1456,7 +1456,7 @@ internal class Application.Controller : Geary.BaseObject {
|
|||
}
|
||||
|
||||
private void on_sent(Geary.Smtp.ClientService service,
|
||||
Geary.RFC822.Message sent) {
|
||||
Geary.Email sent) {
|
||||
/// Translators: The label for an in-app notification. The
|
||||
/// string substitution is a list of recipients of the email.
|
||||
string message = _(
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class Geary.Smtp.ClientService : Geary.ClientService {
|
|||
private Cancellable? queue_cancellable = null;
|
||||
|
||||
/** Emitted when the manager has sent an email. */
|
||||
public signal void email_sent(Geary.RFC822.Message rfc822);
|
||||
public signal void email_sent(Geary.Email email);
|
||||
|
||||
/** Emitted when an error occurred sending an email. */
|
||||
public signal void report_problem(Geary.ProblemReport problem);
|
||||
|
|
@ -252,6 +252,7 @@ public class Geary.Smtp.ClientService : Geary.ClientService {
|
|||
debug("Outbox postie: Sending \"%s\" (ID:%s)...",
|
||||
email_subject(message), email.id.to_string());
|
||||
yield send_email_internal(message, cancellable);
|
||||
email_sent(email);
|
||||
|
||||
// Mark as sent, so if there's a problem pushing up to
|
||||
// Sent, we don't retry sending. Don't pass the
|
||||
|
|
@ -353,8 +354,6 @@ public class Geary.Smtp.ClientService : Geary.ClientService {
|
|||
|
||||
if (smtp_err != null)
|
||||
throw smtp_err;
|
||||
|
||||
email_sent(rfc822);
|
||||
}
|
||||
|
||||
private async void save_sent_mail(Geary.Email message,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue