From 2588a12f3073775d4b0ce46c7f80cee7ba2dae1d Mon Sep 17 00:00:00 2001 From: Adam Dingle Date: Sun, 19 Jan 2020 11:54:36 +0100 Subject: [PATCH] Don't display "email queued for delivery" when undo-send-delay is 0 Closes #672 --- src/client/application/application-controller.vala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/client/application/application-controller.vala b/src/client/application/application-controller.vala index 87f70a44..12470943 100644 --- a/src/client/application/application-controller.vala +++ b/src/client/application/application-controller.vala @@ -2630,13 +2630,14 @@ private class Application.SendComposerCommand : ComposerCommand { public override async void execute(GLib.Cancellable? cancellable) throws GLib.Error { Geary.ComposedEmail email = yield this.composer.get_composed_email(); - /// Translators: The label for an in-app notification. The - /// string substitution is a list of recipients of the email. - this.executed_label = _( - "Email to %s queued for delivery" - ).printf(Util.Email.to_short_recipient_display(email)); - + if (this.can_undo) { + /// Translators: The label for an in-app notification. The + /// string substitution is a list of recipients of the email. + this.executed_label = _( + "Email to %s queued for delivery" + ).printf(Util.Email.to_short_recipient_display(email)); + this.saved = yield this.smtp.save_email(email, cancellable); this.commit_timer.start(); } else {