mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
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:
parent
ae33c82268
commit
0f9be64d6c
2 changed files with 10 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue