Browse Source

Skip app update if current version is greater than remote version.

tags/v2.1.2
Andrew Belt 2 years ago
parent
commit
c833c08da9
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      src/library.cpp

+ 7
- 3
src/library.cpp View File

@@ -70,8 +70,12 @@ void checkAppUpdate() {
DEFER({json_decref(resJ);});

json_t* versionJ = json_object_get(resJ, "version");
if (versionJ)
appVersion = json_string_value(versionJ);
if (versionJ) {
std::string appVersion = json_string_value(versionJ);
// Check if app version is more recent than current version
if (string::Version(APP_VERSION) < string::Version(appVersion))
library::appVersion = appVersion;
}

json_t* changelogUrlJ = json_object_get(resJ, "changelogUrl");
if (changelogUrlJ)
@@ -87,7 +91,7 @@ void checkAppUpdate() {


bool isAppUpdateAvailable() {
return (appVersion != "") && (appVersion != APP_VERSION);
return (appVersion != "");
}




Loading…
Cancel
Save