Commit 57ecb525 authored by Christian Schoenebeck's avatar Christian Schoenebeck
Browse files

Fix resend after import

After importing a message via 'File' -> 'Open...', sending that
message via 'Message' -> 'Send again...' was broken, as the latter
menu action would simply do nothing.

Fix this issue by not returning from slotResendMessage() if message
viewer's associated Akonadi::Item is not valid, which is always the
case on imported MIME message files.

Additionally check whether there is a payload instead of checking
for a valid item ID for deciding whether to gray out 'Send Again...'.
parent 77b558e9
......@@ -358,7 +358,7 @@ void MessageActions::updateActions()
mReplyAllAction->setEnabled(hasPayload);
mReplyListAction->setEnabled(hasPayload);
mNoQuoteReplyAction->setEnabled(hasPayload);
mSendAgainAction->setEnabled(itemValid);
mSendAgainAction->setEnabled(hasPayload);
mAnnotateAction->setEnabled(uniqItem);
mAddFollowupReminderAction->setEnabled(uniqItem);
......@@ -733,9 +733,7 @@ void MessageActions::slotDebugAkonadiSearch()
void MessageActions::slotResendMessage()
{
if (!mCurrentItem.isValid()) {
return;
}
// mCurrentItem.isValid() may be false here if message was imported via 'File' -> 'Open...'
KMCommand *command = new KMResendMessageCommand(mParent, mCurrentItem);
command->start();
}
......
Supports Markdown
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