mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
Update only historical builds
This commit is contained in:
parent
e4ac496c07
commit
e547b468b6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user