mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-07 15:10:43 +02:00
Merge remote-tracking branch 'origin/check-for-updates' into mod-from-github
This commit is contained in:
commit
80a206116e
@ -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…
x
Reference in New Issue
Block a user