From bcca611176cde56de50f16532d9bee45fc838ac5 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 23 Feb 2019 21:25:32 -0600 Subject: Store endorsement state of MO when a reply is received --- src/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ca647872..18dd79d9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5720,10 +5720,12 @@ void MainWindow::nxmEndorsementToggled(QString, int, QVariant, QVariant resultDa QMap results = resultData.toMap(); if (results["status"].toString().compare("Endorsed") == 0) { QMessageBox::information(this, tr("Thank you!"), tr("Thank you for your endorsement!")); + Settings::instance().directInterface().setValue("endorse_state", "Endorsed"); } else if (results["status"].toString().compare("Abstained") == 0) { QMessageBox::information(this, tr("Okay."), tr("This mod will not be endorsed and will no longer ask you to endorse.")); + Settings::instance().directInterface().setValue("endorse_state", "Abstained"); } - ui->actionEndorseMO->setVisible(false); + ui->actionEndorseMO->setEnabled(false); if (!disconnect(sender(), SIGNAL(nxmEndorsementToggled(QString, int, QVariant, QVariant, int)), this, SLOT(nxmEndorsementToggled(QString, int, QVariant, QVariant, int)))) { qCritical("failed to disconnect endorsement slot"); -- cgit v1.3.1