mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Update only historical builds
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user