Fixed race condition with clipboard and system notification on upload (#2053)

This commit is contained in:
borgmanJeremy
2021-11-09 17:54:00 -06:00
committed by GitHub
parent 6432490c31
commit e300141ff8

View File

@@ -180,9 +180,10 @@ void CaptureRequest::exportCapture(const QPixmap& capture)
widget, &ImgurUploader::uploadOk, [widget, tasks](const QUrl& url) {
if (ConfigHandler().copyAndCloseAfterUpload()) {
if (!(tasks & COPY)) {
QApplication::clipboard()->setText(url.toString());
SystemNotification().sendMessage(
QObject::tr("URL copied to clipboard."));
QApplication::clipboard()->setText(url.toString());
widget->close();
} else {
widget->showPostUploadDialog();