From 190c9f1c00bedcee0946b02e215878e431eadd16 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 9 Aug 2024 15:59:40 +0200 Subject: [PATCH] Update the (un)synced space count when a sync is removed Fixes: #11787 --- src/gui/accountsettings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 5cb3bdb4cae..80aafd7dd88 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -286,9 +286,10 @@ void AccountSettings::slotRemoveCurrentFolder(Folder *folder) messageBox->setAttribute(Qt::WA_DeleteOnClose); QPushButton *yesButton = messageBox->addButton(tr("Remove Folder Sync Connection"), QMessageBox::YesRole); messageBox->addButton(tr("Cancel"), QMessageBox::NoRole); - connect(messageBox, &QMessageBox::finished, this, [messageBox, yesButton, folder] { + connect(messageBox, &QMessageBox::finished, this, [messageBox, yesButton, folder, this] { if (messageBox->clickedButton() == yesButton) { FolderMan::instance()->removeFolder(folder); + QTimer::singleShot(0, this, &AccountSettings::slotSpacesUpdated); } }); messageBox->open();