@@ -118,8 +118,8 @@ class MainActivity : UriResultActivity() {
118
118
}
119
119
120
120
// 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 ) {
123
123
AlertDialog .Builder (this )
124
124
.setTitle(R .string.id_update)
125
125
.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() {
358
358
private fun powerOff () {
359
359
contentMainOn.visibility = View .GONE
360
360
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 } "
363
363
statusText.text = " Offline. Rub the lamp to turn on."
364
364
powerImageView.off()
365
365
invalidateOptionsMenu()
@@ -408,7 +408,7 @@ class MainActivity : UriResultActivity() {
408
408
return
409
409
410
410
runOnUiThread {
411
- getPreferences(Context .MODE_PRIVATE ).edit().putString(" RELEASE" , Archive .RELEASE ).apply ()
411
+ getPreferences(Context .MODE_PRIVATE ).edit().putString(" RELEASE" , Archive .RELEASE .version ).apply ()
412
412
statusText.text =
413
413
" Download Completed. Uncompressing..."
414
414
}
0 commit comments