diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ set(LIBGRAVATAR_VERSION_LIB "5.8.80") set(MAILCOMMON_LIB_VERSION_LIB "5.8.80") set(KDEPIM_APPS_LIB_VERSION_LIB "5.8.80") -set(MESSAGELIB_LIB_VERSION_LIB "5.8.80") +set(MESSAGELIB_LIB_VERSION_LIB "5.8.81") set(LIBKLEO_LIB_VERSION_LIB "5.8.80") set(PIMCOMMON_LIB_VERSION_LIB "5.8.80") set(LIBKDEPIM_LIB_VERSION_LIB "5.8.80") diff --git a/src/kmmainwidget.cpp b/src/kmmainwidget.cpp --- a/src/kmmainwidget.cpp +++ b/src/kmmainwidget.cpp @@ -455,20 +455,22 @@ return {}; } +// Connected to the currentChanged signals from the folderTreeView and favorites view. void KMMainWidget::slotFolderChanged(const Akonadi::Collection &collection) { + if (mCurrentCollection == collection) + return; folderSelected(collection); if (collection.cachePolicy().syncOnDemand()) { AgentManager::self()->synchronizeCollection(collection, false); } mMsgActions->setCurrentMessage(Akonadi::Item()); Q_EMIT captionChangeRequest(MailCommon::Util::fullCollectionPath(collection)); } +// Called by slotFolderChanged (no particular reason for this method to be split out) void KMMainWidget::folderSelected(const Akonadi::Collection &col) { - // This is connected to the MainFolderView signal triggering when a folder is selected - if (mGoToFirstUnreadMessageInSelectedFolder) { // the default action has been overridden from outside mPreSelectionMode = MessageList::Core::PreSelectFirstUnreadCentered; @@ -537,7 +539,8 @@ void KMMainWidget::slotShowSelectedFolderInPane() { if (mCurrentCollection.isValid()) { - mMessagePane->setCurrentFolder(mCurrentCollection, false, mPreSelectionMode); + QModelIndex idx = Akonadi::EntityTreeModel::modelIndexForCollection(KMKernel::self()->entityTreeModel(), mCurrentCollection); + mMessagePane->setCurrentFolder(mCurrentCollection, idx, false, mPreSelectionMode); } updateMessageActions(); updateFolderMenu(); @@ -2147,7 +2150,7 @@ { if (mFolderTreeWidget) { mFolderTreeWidget->selectCollectionFolder(col); - slotFolderChanged(col); + slotFolderChanged(col); // call it explicitly in case the collection is filtered out in the foldertreeview } }