Commit 78c5552b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure that we use plugin when we use sendlater feature

parent 26c01580
...@@ -2395,7 +2395,7 @@ void KMComposerWin::printComposeResult(KJob *job, bool preview) ...@@ -2395,7 +2395,7 @@ void KMComposerWin::printComposeResult(KJob *job, bool preview)
} }
void KMComposerWin::doSend(MessageComposer::MessageSender::SendMethod method, void KMComposerWin::doSend(MessageComposer::MessageSender::SendMethod method,
MessageComposer::MessageSender::SaveIn saveIn) MessageComposer::MessageSender::SaveIn saveIn, bool willSendItWithoutReediting)
{ {
// TODO integrate with MDA online status // TODO integrate with MDA online status
if (method == MessageComposer::MessageSender::SendImmediate) { if (method == MessageComposer::MessageSender::SendImmediate) {
...@@ -2404,7 +2404,7 @@ void KMComposerWin::doSend(MessageComposer::MessageSender::SendMethod method, ...@@ -2404,7 +2404,7 @@ void KMComposerWin::doSend(MessageComposer::MessageSender::SendMethod method,
} }
} }
if (saveIn == MessageComposer::MessageSender::SaveInNone) { // don't save as draft or template, send immediately if (saveIn == MessageComposer::MessageSender::SaveInNone || willSendItWithoutReediting) { // don't save as draft or template, send immediately
if (KEmailAddress::firstEmailAddress(from()).isEmpty()) { if (KEmailAddress::firstEmailAddress(from()).isEmpty()) {
if (!(mShowHeaders & HDR_FROM)) { if (!(mShowHeaders & HDR_FROM)) {
mShowHeaders |= HDR_FROM; mShowHeaders |= HDR_FROM;
...@@ -2588,6 +2588,7 @@ void KMComposerWin::slotSendLater() ...@@ -2588,6 +2588,7 @@ void KMComposerWin::slotSendLater()
if (!checkRecipientNumber()) { if (!checkRecipientNumber()) {
return; return;
} }
mComposerBase->setSendLaterInfo(nullptr);
if (mComposerBase->editor()->checkExternalEditorFinished()) { if (mComposerBase->editor()->checkExternalEditorFinished()) {
const bool wasRegistered = (SendLater::SendLaterUtil::sentLaterAgentWasRegistered() && SendLater::SendLaterUtil::sentLaterAgentEnabled()); const bool wasRegistered = (SendLater::SendLaterUtil::sentLaterAgentWasRegistered() && SendLater::SendLaterUtil::sentLaterAgentEnabled());
if (wasRegistered) { if (wasRegistered) {
...@@ -2610,9 +2611,9 @@ void KMComposerWin::slotSendLater() ...@@ -2610,9 +2611,9 @@ void KMComposerWin::slotSendLater()
case SendLater::SendLaterDialog::SendDeliveryAtTime: { case SendLater::SendLaterDialog::SendDeliveryAtTime: {
mComposerBase->setSendLaterInfo(info); mComposerBase->setSendLaterInfo(info);
if (info->isRecurrence()) { if (info->isRecurrence()) {
doSend(MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInTemplates); doSend(MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInTemplates, true);
} else { } else {
doSend(MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInDrafts); doSend(MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInDrafts, true);
} }
break; break;
} }
......
...@@ -514,7 +514,8 @@ private: ...@@ -514,7 +514,8 @@ private:
* Send the message. * Send the message.
*/ */
void doSend(MessageComposer::MessageSender::SendMethod method = MessageComposer::MessageSender::SendDefault, void doSend(MessageComposer::MessageSender::SendMethod method = MessageComposer::MessageSender::SendDefault,
MessageComposer::MessageSender::SaveIn saveIn = MessageComposer::MessageSender::SaveInNone); MessageComposer::MessageSender::SaveIn saveIn = MessageComposer::MessageSender::SaveInNone,
bool willSendItWithoutReediting = false);
void doDelayedSend(MessageComposer::MessageSender::SendMethod method, MessageComposer::MessageSender::SaveIn saveIn); void doDelayedSend(MessageComposer::MessageSender::SendMethod method, MessageComposer::MessageSender::SaveIn saveIn);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment