Updated on 2026-08-14
This commit is contained in:
parent
424c9f8898
commit
8e2f4095c5
13 changed files with 82 additions and 20 deletions
|
|
@ -1,9 +1,9 @@
|
|||
package com.tangem.ui.activity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.tangem.App
|
||||
import com.tangem.Constant
|
||||
|
|
@ -36,14 +36,25 @@ class LogoActivity : AppCompatActivity() {
|
|||
ivLogo.setOnClickListener { hide() }
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onPostCreate(savedInstanceState: Bundle?) {
|
||||
super.onPostCreate(savedInstanceState)
|
||||
|
||||
// set beta version name
|
||||
if (BuildConfig.DEBUG)
|
||||
tvAppVersion.text = "BETA v." + BuildConfig.VERSION_NAME + "\n" + "dev" + "\n" + "build " + BuildConfig.VERSION_CODE
|
||||
tvAppVersion.text = String.format(getString(R.string.version_name_debug), BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE)
|
||||
else
|
||||
tvAppVersion.text = "BETA v." + BuildConfig.VERSION_NAME
|
||||
tvAppVersion.text = String.format(getString(R.string.version_name_release), BuildConfig.VERSION_NAME)
|
||||
|
||||
// set flavor app name
|
||||
when (BuildConfig.FLAVOR) {
|
||||
Constant.FLAVOR_TANGEM_CARDANO -> {
|
||||
tvExtension.visibility = View.VISIBLE
|
||||
tvExtension.text = getString(R.string.cardano)
|
||||
}
|
||||
else -> {
|
||||
tvExtension.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
if (intent.getBooleanExtra(Constant.EXTRA_AUTO_HIDE, true))
|
||||
ivLogo.postDelayed(hideRunnable, Constant.MILLIS_AUTO_HIDE.toLong())
|
||||
|
|
|
|||
|
|
@ -142,7 +142,8 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
val responseBuildVersion = responseVersionName.split('.').last()
|
||||
val appBuildVersion = BuildConfig.VERSION_NAME.split('.').last()
|
||||
if (responseBuildVersion.toInt() > appBuildVersion.toInt())
|
||||
toastHelper.showSnackbarUpdateVersion(this, cl, responseVersionName)
|
||||
if (BuildConfig.FLAVOR.equals(Constant.FLAVOR_TANGEM_ACCESS))
|
||||
toastHelper.showSnackbarUpdateVersion(this, cl, responseVersionName)
|
||||
} catch (E: Exception) {
|
||||
E.printStackTrace()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue