diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-08-12 12:33:22 -0500 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-08-12 12:33:22 -0500 |
| commit | 9a426a2474700b3e3e858b3299d8a60bca58f8c7 (patch) | |
| tree | 41c3f21ac68f55bd82da9f480ae9e53e9aeff00d /src/mainwindow.cpp | |
| parent | 80594d6e1a6f90dd3964497d66ffca54888a79d4 (diff) | |
Revert "Improve robustness of endorsement checks"
This reverts commit fc8a6b358fb7bda18979c7c5c23c13d7c2ae8dc8.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<int> &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<int> &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());
}
|
