fix(PrismExternalUpdater): do not show "No updates available" when ignoring skipped version during autocheck

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2026-05-03 18:14:09 +05:00
parent ae33c82268
commit 0f9be64d6c
No known key found for this signature in database
GPG key ID: B77C34313AEE1FFF
2 changed files with 10 additions and 8 deletions

View file

@ -308,18 +308,20 @@ void PrismExternalUpdater::autoCheckTimerFired() const
void PrismExternalUpdater::offerUpdate(const QString& versionName,
const QString& versionTag,
const QString& releaseNotes,
const bool ignoreSkipped) const
const bool triggeredByUser) const
{
priv->settings->beginGroup("skip");
auto shouldSkip = !ignoreSkipped && priv->settings->value(versionTag, false).toBool();
auto shouldSkip = !triggeredByUser && priv->settings->value(versionTag, false).toBool();
priv->settings->endGroup();
if (shouldSkip) {
auto msgBox = QMessageBox(QMessageBox::Information, tr("No Update Available"), tr("There are no new updates available."),
QMessageBox::Ok, priv->parent);
msgBox.setMinimumWidth(460);
msgBox.adjustSize();
msgBox.exec();
if (triggeredByUser) {
auto msgBox = QMessageBox(QMessageBox::Information, tr("No Update Available"), tr("There are no new updates available."),
QMessageBox::Ok, priv->parent);
msgBox.setMinimumWidth(460);
msgBox.adjustSize();
msgBox.exec();
}
return;
}

View file

@ -81,7 +81,7 @@ class PrismExternalUpdater : public ExternalUpdater {
void disconnectTimer();
void connectTimer();
void offerUpdate(const QString& versionName, const QString& versionTag, const QString& releaseNotes, bool ignoreSkipped) const;
void offerUpdate(const QString& versionName, const QString& versionTag, const QString& releaseNotes, bool triggeredByUser) const;
void performUpdate(const QString& versionTag) const;
public slots: