diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-02-07 12:55:18 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-12 20:57:17 +0200 |
commit | 7a71ecd8af0454e405b25080a4b266fc99306269 (patch) | |
tree | e1bb6527d5d968ddb41f2f281b46582dff5b9131 /gui/MainWindow.cpp | |
parent | 4e94de413ba60a1da91715a41c8ba8caa8474728 (diff) | |
download | MultiMC-7a71ecd8af0454e405b25080a4b266fc99306269.tar MultiMC-7a71ecd8af0454e405b25080a4b266fc99306269.tar.gz MultiMC-7a71ecd8af0454e405b25080a4b266fc99306269.tar.lz MultiMC-7a71ecd8af0454e405b25080a4b266fc99306269.tar.xz MultiMC-7a71ecd8af0454e405b25080a4b266fc99306269.zip |
NOISSUE fix notification checker
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r-- | gui/MainWindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index f5382ed0..1b76e6af 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -619,10 +619,16 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi auto updater = MMC->updateChecker(); updater->checkForUpdate(MMC->settings()->get("UpdateChannel").toString(), false); } - m_notificationChecker.reset(new NotificationChecker()); + 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(MMC->settings()->get("SelectedInstance").toString()); @@ -959,7 +965,7 @@ void MainWindow::notificationsChanged() for (auto it = entries.begin(); it != entries.end(); ++it) { NotificationChecker::NotificationEntry entry = *it; - if (!shownNotifications.contains(entry.id) && entry.applies()) + if (!shownNotifications.contains(entry.id)) { NotificationDialog dialog(entry, this); if (dialog.exec() == NotificationDialog::DontShowAgain) |