@@ -118,8 +118,8 @@ class MainActivity : UriResultActivity() {
118118 }
119119
120120 // Check lightning_ndk release version
121- val release = getPreferences(Context .MODE_PRIVATE ).getString(" RELEASE" , Archive .RELEASE )
122- if (release != Archive .RELEASE ) {
121+ val release = getPreferences(Context .MODE_PRIVATE ).getString(" RELEASE" , Archive .RELEASE .version )
122+ if (release != Archive .RELEASE .version ) {
123123 AlertDialog .Builder (this )
124124 .setTitle(R .string.id_update)
125125 .setMessage(" New lightning_ndk version is available: ${Archive .RELEASE } . Make a backup from Settings. Tap Update to start download." )
@@ -358,8 +358,8 @@ class MainActivity : UriResultActivity() {
358358 private fun powerOff () {
359359 contentMainOn.visibility = View .GONE
360360 contentMainOff.visibility = View .VISIBLE
361- val release = getPreferences(Context .MODE_PRIVATE ).getString(" RELEASE" , " " )
362- versionText.text = " Version: ${BuildConfig .VERSION_NAME } - ${release } "
361+ // val release = getPreferences(Context.MODE_PRIVATE).getString("RELEASE", "")
362+ versionText.text = " Version: ${BuildConfig .VERSION_NAME } - ${Archive . RELEASE } "
363363 statusText.text = " Offline. Rub the lamp to turn on."
364364 powerImageView.off()
365365 invalidateOptionsMenu()
@@ -408,7 +408,7 @@ class MainActivity : UriResultActivity() {
408408 return
409409
410410 runOnUiThread {
411- getPreferences(Context .MODE_PRIVATE ).edit().putString(" RELEASE" , Archive .RELEASE ).apply ()
411+ getPreferences(Context .MODE_PRIVATE ).edit().putString(" RELEASE" , Archive .RELEASE .version ).apply ()
412412 statusText.text =
413413 " Download Completed. Uncompressing..."
414414 }
0 commit comments