Defer closing until batch cancellation and cleanup finish

This commit is contained in:
evgeny committed 2026-10-10 09:38:35 +02:00
1 parent 4a6765c49a
commit 973c734226
2 files changed
+14 -2

No files matched your search

+2 -2
View File
@@ -523,7 +523,7 @@ void MemberFileBrowser::beginUploads(const QStringList& paths, bool chooseServer
auto* batch = createBatch(MemberFileBatch::Upload);
batch->finished = [this, batch](bool, const QString& summary, const QStringList&) {
m_batch = nullptr; m_progress->hide(); m_uploadStatus->setText(summary); batch->deleteLater(); updateActions(); refresh();
if (m_closeAfterBatch) close();
if (m_closeAfterBatch) QTimer::singleShot(0, this, &QWidget::close);
};
m_uploadStatus->setText(text("Checking selected files…")); batch->upload(paths, m_path);
}
@@ -651,7 +651,7 @@ void MemberFileBrowser::mutate(uint8_t command) {
auto* batch = createBatch(MemberFileBatch::Remove);
batch->finished = [this, batch](bool, const QString& summary, const QStringList&) {
m_batch = nullptr; m_progress->hide(); m_uploadStatus->setText(summary); batch->deleteLater(); updateActions(); refresh();
if (m_closeAfterBatch) close();
if (m_closeAfterBatch) QTimer::singleShot(0, this, &QWidget::close);
};
batch->start(entries); return;
}