diff options
author | swirl <swurl@swurl.xyz> | 2022-02-20 19:23:08 -0500 |
---|---|---|
committer | swirl <swurl@swurl.xyz> | 2022-02-20 19:23:08 -0500 |
commit | da70122d9c46c6281c06fe1dedc558c13077f64f (patch) | |
tree | 2a8804f710b3b60a8cdfdf71fee90333234765f0 /launcher/ui/MainWindow.cpp | |
parent | 613b351f1342ac80f5699dbdb53b9ff5c1f1056f (diff) | |
download | PrismLauncher-da70122d9c46c6281c06fe1dedc558c13077f64f.tar.gz PrismLauncher-da70122d9c46c6281c06fe1dedc558c13077f64f.tar.bz2 PrismLauncher-da70122d9c46c6281c06fe1dedc558c13077f64f.zip |
remove notifications
Diffstat (limited to 'launcher/ui/MainWindow.cpp')
-rw-r--r-- | launcher/ui/MainWindow.cpp | 31 |
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) { |