diff --git a/src/core/controller.cpp b/src/core/controller.cpp
index 2666d1e8..93fb4865 100644
--- a/src/core/controller.cpp
+++ b/src/core/controller.cpp
@@ -302,6 +302,15 @@ void Controller::updateConfigComponents()
}
}
+void Controller::updateRecentScreenshots()
+{
+ if (nullptr != m_history) {
+ if (m_history->isVisible()) {
+ m_history->loadHistory();
+ }
+ }
+}
+
void Controller::showRecentScreenshots()
{
if (nullptr == m_history) {
diff --git a/src/core/controller.h b/src/core/controller.h
index 0cb9ee24..54cca5cc 100644
--- a/src/core/controller.h
+++ b/src/core/controller.h
@@ -45,6 +45,7 @@ public:
void operator=(const Controller&) = delete;
void enableExports();
+ void updateRecentScreenshots();
signals:
void captureTaken(uint id, QPixmap p);
diff --git a/src/tools/storage/imgur/imguruploader.cpp b/src/tools/storage/imgur/imguruploader.cpp
index 02bff6d8..710d5049 100644
--- a/src/tools/storage/imgur/imguruploader.cpp
+++ b/src/tools/storage/imgur/imguruploader.cpp
@@ -16,6 +16,7 @@
// along with Flameshot. If not, see .
#include "imguruploader.h"
+#include "src/core/controller.h"
#include "src/utils/confighandler.h"
#include "src/utils/filenamehandler.h"
#include "src/utils/history.h"
@@ -86,6 +87,7 @@ void ImgurUploader::handleReply(QNetworkReply* reply)
QApplication::clipboard()->setText(imageUrl().toString());
SystemNotification().sendMessage(
QObject::tr("URL copied to clipboard."));
+ Controller::getInstance()->updateRecentScreenshots();
close();
} else {
onUploadOk();
diff --git a/src/tools/storage/s3/imgs3uploader.cpp b/src/tools/storage/s3/imgs3uploader.cpp
index c713e6f3..d7ff78e2 100644
--- a/src/tools/storage/s3/imgs3uploader.cpp
+++ b/src/tools/storage/s3/imgs3uploader.cpp
@@ -18,6 +18,7 @@
#include "imgs3uploader.h"
#include "imgs3settings.h"
+#include "src/core/controller.h"
#include "src/utils/confighandler.h"
#include "src/utils/history.h"
#include "src/utils/systemnotification.h"
@@ -200,6 +201,7 @@ void ImgS3Uploader::handleReplyUpload(QNetworkReply* reply)
if (ConfigHandler().copyAndCloseAfterUploadEnabled()) {
QApplication::clipboard()->setText(imageUrl().toString());
SystemNotification().sendMessage(tr("URL copied to clipboard."));
+ Controller::getInstance()->updateRecentScreenshots();
close();
} else {
onUploadOk();
diff --git a/src/widgets/capturelauncher.cpp b/src/widgets/capturelauncher.cpp
index 1366b577..4c9edded 100644
--- a/src/widgets/capturelauncher.cpp
+++ b/src/widgets/capturelauncher.cpp
@@ -20,9 +20,6 @@
#include "src/utils/screengrabber.h"
#include "src/utils/screenshotsaver.h"
#include "src/widgets/imagelabel.h"
-
-#include "src/widgets/notificationwidget.h"
-#include
#include
#include
#include