Commit 781e560a authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 420327 - reload email after changing html preference for contact

FIXED-IN: 5.14.1
BUG: 420327
parent a39043f2
......@@ -70,7 +70,7 @@ set(KDEPIM_APPS_LIB_VERSION_LIB "5.14.0")
set(MESSAGELIB_LIB_VERSION_LIB "5.14.0")
set(LIBKLEO_LIB_VERSION_LIB "5.14.0")
set(PIMCOMMON_LIB_VERSION_LIB "5.14.0")
set(LIBKDEPIM_LIB_VERSION_LIB "5.14.0")
set(LIBKDEPIM_LIB_VERSION_LIB "5.14.1")
set(LIBKSIEVE_LIB_VERSION_LIB "5.14.0")
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
......
......@@ -523,11 +523,13 @@ private:
void replyCurrentMessageCommand(MessageComposer::ReplyStrategy strategy);
void setupUnifiedMailboxChecker();
QAction *filterToAction(MailCommon::MailFilter *filter);
Akonadi::Collection::List applyFilterOnCollection(bool recursive);
Q_REQUIRED_RESULT Akonadi::Collection::List applyFilterOnCollection(bool recursive);
void setShowStatusBarMessage(const QString &msg);
void slotRestartAccount();
void slotAccountSettings();
void updateDisplayFormatMessage();
void slotContactHtmlPreferencesUpdated(const Akonadi::Item &contact, Akonadi::Item::Id id, bool showAsHTML, bool remoteContent);
// Message actions
QAction *mDeleteAction = nullptr;
......
......@@ -836,12 +836,22 @@ void KMReaderWin::slotContactHtmlOptions()
const QString emailString = KEmailAddress::decodeMailtoUrl(url).toLower();
KPIM::AddEmailDiplayJob *job = new KPIM::AddEmailDiplayJob(emailString, mMainWindow, this);
job->setMessageId(mViewer->messageItem().id());
connect(job, &KPIM::AddEmailDisplayJob::contactUpdated, this, &KMReaderWin::slotContactHtmlPreferencesUpdated);
job->setRemoteContent(mLoadExternalReference->isChecked());
job->setShowAsHTML(mViewAsHtml->isChecked());
job->setContact(mSearchedContact);
job->start();
}
void KMReaderWin::slotContactHtmlPreferencesUpdated(const Akonadi::Item &contact, Akonadi::Item::Id id, bool showAsHTML, bool remoteContent)
{
Q_UNUSED(contact)
if (mViewer->messageItem().id() == id) {
mViewer->slotChangeDisplayMail(showAsHTML ? Viewer::Html : Viewer::Text, remoteContent);
}
}
void KMReaderWin::slotEditContact()
{
if (mSearchedContact.isValid()) {
......
......@@ -219,12 +219,13 @@ public Q_SLOTS:
void slotPrintingFinished();
protected:
QUrl urlClicked() const;
QUrl imageUrlClicked() const;
Q_REQUIRED_RESULT QUrl urlClicked() const;
Q_REQUIRED_RESULT QUrl imageUrlClicked() const;
private:
void createActions();
void updateHtmlActions();
void slotContactHtmlPreferencesUpdated(const Akonadi::Item &contact, Akonadi::Item::Id id, bool showAsHTML, bool remoteContent);
private:
KContacts::Addressee mSearchedAddress;
......
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