Ethosa 3 years ago
parent
commit
96cbb24f23
2 changed files with 9 additions and 3 deletions
  1. 1 1
      app/build.gradle
  2. 8 2
      app/src/main/java/com/ethosa/ktc/college/ActualAppVersion.kt

+ 1 - 1
app/build.gradle

@@ -15,7 +15,7 @@ android {
         minSdk 21
         targetSdk 33
         versionCode 26
-        versionName "0.9.1"
+        versionName "0.9.2"
         ndk {
             abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
         }

+ 8 - 2
app/src/main/java/com/ethosa/ktc/college/ActualAppVersion.kt

@@ -23,9 +23,15 @@ data class ActualAppVersion(
      * @return true if version is actual.
      */
     fun isActual(): Boolean {
-        for (i in 0..2) {
-            if (actual_version[i] > AppUpdater.VERSION[i]) {
+        if (actual_version[0] > AppUpdater.VERSION[0]) {
+            return false
+        } else {
+            if (actual_version[1] > AppUpdater.VERSION[1]) {
                 return false
+            } else {
+                if (actual_version[2] > AppUpdater.VERSION[2]) {
+                    return false
+                }
             }
         }
         return true