Skip to content

Commit

Permalink
fixed update recognition (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Oct 27, 2020
1 parent 0b4a061 commit 720e89d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class MainActivity : AppCompatActivity() {
val versionName = versionNameAndFollowing.split("\"")[0]
editor.putString("newestVersion", versionName).apply()

if (BuildConfig.VERSION_CODE != newestVersionCode) {
if (BuildConfig.VERSION_CODE < newestVersionCode) {
Log.d(this@MainActivity::class.java.simpleName, "Update available: $versionName")
val dialogMessage = String.format(getString(R.string.update_dialog_message), "$versionName ($versionCode)",
"${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
Expand Down

0 comments on commit 720e89d

Please sign in to comment.