Commit 510deb42 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement historyswitch folder manager

parent 2226633b
Pipeline #88384 passed with stage
in 25 minutes and 35 seconds
......@@ -22,7 +22,9 @@ HistorySwitchFolderManager::~HistorySwitchFolderManager()
void HistorySwitchFolderManager::addHistory(const Akonadi::Collection &currentCol, const Akonadi::Collection &col)
{
mUndoStack->push(new HistorySwitchFolderCommand(this, currentCol, col));
if (currentCol.isValid() && col.isValid()) {
mUndoStack->push(new HistorySwitchFolderCommand(this, currentCol, col));
}
}
void HistorySwitchFolderManager::clear()
......@@ -32,6 +34,7 @@ void HistorySwitchFolderManager::clear()
void HistorySwitchFolderManager::changeCollection(const Akonadi::Collection &currentCol)
{
qDebug() << "HistorySwitchFolderManager::changeCollection " << currentCol;
Q_EMIT switchToFolder(currentCol);
}
......
......@@ -335,6 +335,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCo
connect(&mCheckMailTimer, &QTimer::timeout, this, &KMMainWidget::slotUpdateActionsAfterMailChecking);
setupUnifiedMailboxChecker();
connect(mHistorySwitchFolderManager, &HistorySwitchFolderManager::switchToFolder, this, &KMMainWidget::slotSelectCollectionFolder);
}
QWidget *KMMainWidget::dkimWidgetInfo() const
......@@ -480,7 +481,7 @@ void KMMainWidget::slotFolderChanged(const Akonadi::Collection &collection)
return;
}
// Store previous collection
mHistorySwitchFolderManager->addHistory(mCurrentCollection, collection);
// FIXME mHistorySwitchFolderManager->addHistory(mCurrentCollection, collection);
if (mGoToFirstUnreadMessageInSelectedFolder) {
// the default action has been overridden from outside
mPreSelectionMode = MessageList::Core::PreSelectFirstUnreadCentered;
......
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