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,
|
void PrismExternalUpdater::offerUpdate(const QString& versionName,
|
||||||
const QString& versionTag,
|
const QString& versionTag,
|
||||||
const QString& releaseNotes,
|
const QString& releaseNotes,
|
||||||
const bool ignoreSkipped) const
|
const bool triggeredByUser) const
|
||||||
{
|
{
|
||||||
priv->settings->beginGroup("skip");
|
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();
|
priv->settings->endGroup();
|
||||||
|
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
auto msgBox = QMessageBox(QMessageBox::Information, tr("No Update Available"), tr("There are no new updates available."),
|
if (triggeredByUser) {
|
||||||
QMessageBox::Ok, priv->parent);
|
auto msgBox = QMessageBox(QMessageBox::Information, tr("No Update Available"), tr("There are no new updates available."),
|
||||||
msgBox.setMinimumWidth(460);
|
QMessageBox::Ok, priv->parent);
|
||||||
msgBox.adjustSize();
|
msgBox.setMinimumWidth(460);
|
||||||
msgBox.exec();
|
msgBox.adjustSize();
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class PrismExternalUpdater : public ExternalUpdater {
|
||||||
void disconnectTimer();
|
void disconnectTimer();
|
||||||
void connectTimer();
|
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;
|
void performUpdate(const QString& versionTag) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue