aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/MainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/MainWindow.cpp')
-rw-r--r--launcher/ui/MainWindow.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index ad7227cc..a3da64e4 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -59,7 +59,6 @@
#include <net/NetJob.h>
#include <net/Download.h>
#include <news/NewsChecker.h>
-#include <notifications/NotificationChecker.h>
#include <tools/BaseProfiler.h>
#include <updater/DownloadTask.h>
#include <updater/UpdateChecker.h>
@@ -82,7 +81,6 @@
#include "ui/dialogs/CopyInstanceDialog.h"
#include "ui/dialogs/UpdateDialog.h"
#include "ui/dialogs/EditAccountDialog.h"
-#include "ui/dialogs/NotificationDialog.h"
#include "ui/dialogs/ExportInstanceDialog.h"
#include "UpdateController.h"
@@ -835,17 +833,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
}
}
- {
- auto checker = new NotificationChecker();
- checker->setNotificationsUrl(QUrl(BuildConfig.NOTIFICATION_URL));
- checker->setApplicationChannel(BuildConfig.VERSION_CHANNEL);
- checker->setApplicationPlatform(BuildConfig.BUILD_PLATFORM);
- checker->setApplicationFullVersion(BuildConfig.FULL_VERSION_STR);
- m_notificationChecker.reset(checker);
- connect(m_notificationChecker.get(), &NotificationChecker::notificationCheckFinished, this, &MainWindow::notificationsChanged);
- checker->checkForNotifications();
- }
-
setSelectedInstanceById(APPLICATION->settings()->get("SelectedInstance").toString());
// removing this looks stupid
@@ -1257,24 +1244,6 @@ QString intListToString(const QList<int> &list)
}
return slist.join(',');
}
-void MainWindow::notificationsChanged()
-{
- QList<NotificationChecker::NotificationEntry> entries = m_notificationChecker->notificationEntries();
- QList<int> shownNotifications = stringToIntList(APPLICATION->settings()->get("ShownNotifications").toString());
- for (auto it = entries.begin(); it != entries.end(); ++it)
- {
- NotificationChecker::NotificationEntry entry = *it;
- if (!shownNotifications.contains(entry.id))
- {
- NotificationDialog dialog(entry, this);
- if (dialog.exec() == NotificationDialog::DontShowAgain)
- {
- shownNotifications.append(entry.id);
- }
- }
- }
- APPLICATION->settings()->set("ShownNotifications", intListToString(shownNotifications));
-}
void MainWindow::downloadUpdates(GoUpdate::Status status)
{