mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 10:56:57 +03:00
NOISSUE fix notification checker
This commit is contained in:
parent
4e94de413b
commit
7a71ecd8af
3 changed files with 52 additions and 30 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue