Browse Source

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

borgmanJeremy 3 years ago
parent
commit
e300141ff8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/core/capturerequest.cpp

+ 2 - 1
src/core/capturerequest.cpp

@@ -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();