1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-30 04:30:42 +02:00

Update only historical builds

This commit is contained in:
nordsoft 2022-08-28 12:41:36 +04:00
parent e4ac496c07
commit e547b468b6

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();