Update only historical builds

This commit is contained in:
nordsoft
2022-08-28 12:41:36 +04:00
parent e4ac496c07
commit e547b468b6
+8 -1
View File
@@ -103,8 +103,15 @@ void UpdateDialog::loadFromJson(const JsonNode & node)
}
//check whether update is needed
bool isFutureVersion = true;
std::string newVersion = node["version"].String();
if(currentVersion == newVersion)
for(auto & prevVersion : node["history"].Vector())
{
if(prevVersion.String() == currentVersion)
isFutureVersion = false;
}
if(isFutureVersion || currentVersion == newVersion)
{
if(!calledManually)
close();