From 9a426a2474700b3e3e858b3299d8a60bca58f8c7 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sun, 12 Aug 2018 12:33:22 -0500 Subject: Revert "Improve robustness of endorsement checks" This reverts commit fc8a6b358fb7bda18979c7c5c23c13d7c2ae8dc8. --- src/mainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2889876b..7a30ccb6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4417,8 +4417,7 @@ void MainWindow::nxmUpdatesAvailable(const std::vector &modIDs, QVariant us if (game && result["id"].toInt() == game->nexusModOrganizerID() && result["game_id"].toInt() == game->nexusGameID()) { - if (result["voted_by_user"].type() != QVariant::Invalid && - !result["voted_by_user"].toBool()) { + if (!result["voted_by_user"].toBool()) { ui->actionEndorseMO->setVisible(true); } } else { @@ -4442,8 +4441,7 @@ void MainWindow::nxmUpdatesAvailable(const std::vector &modIDs, QVariant us (*iter)->setNewestVersion(result["version"].toString()); (*iter)->setNexusDescription(result["description"].toString()); if (NexusInterface::instance(&m_PluginContainer)->getAccessManager()->loggedIn() && - result.contains("voted_by_user") && - result["voted_by_user"].type() != QVariant::Invalid) { + result.contains("voted_by_user")) { // don't use endorsement info if we're not logged in or if the response doesn't contain it (*iter)->setIsEndorsed(result["voted_by_user"].toBool()); } -- cgit v1.3.1