diff --git a/.gitignore b/.gitignore index ad04c2d..40c5a53 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ release/ x64/ artifacts/ .vscode/ +res/libsodium/libsodium* src/ui_*.h *.autosave src/precompiled.h.cpp diff --git a/src/rpc.cpp b/src/rpc.cpp index 7a7b443..fbce009 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -943,8 +943,14 @@ void RPC::checkForUpdate(bool silent) { } auto currentVersion = QVersionNumber::fromString(APP_VERSION); + + // Get the max version that the user has hidden updates for + QSettings s; + auto maxHiddenVersion = QVersionNumber::fromString(s.value("update/lastversion", "0.0.0").toString()); + qDebug() << "Version check: Current " << currentVersion << ", Available " << maxVersion; - if (maxVersion > currentVersion) { + + if (maxVersion > currentVersion && maxVersion > maxHiddenVersion) { auto ans = QMessageBox::information(main, QObject::tr("Update Available"), QObject::tr("A new release v%1 is available! You have v%2.\n\nWould you like to visit the releases page?") .arg(maxVersion.toString()) @@ -952,6 +958,9 @@ void RPC::checkForUpdate(bool silent) { QMessageBox::Yes, QMessageBox::Cancel); if (ans == QMessageBox::Yes) { QDesktopServices::openUrl(QUrl("https://github.com/ZcashFoundation/zec-qt-wallet/releases")); + } else { + // If the user selects cancel, don't bother them again for this version + s.setValue("update/lastversion", maxVersion.toString()); } } else { if (!silent) {