Updated on 2026-08-14
This commit is contained in:
parent
8f77a7ab99
commit
cd6da4efe7
8 changed files with 56 additions and 46 deletions
|
|
@ -160,13 +160,12 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
val apiHelper = ServerApiHelper()
|
||||
apiHelper.setLastVersionListener { response ->
|
||||
try {
|
||||
val responseVersionName=response.trim(' ','\n','\r','\t')
|
||||
val responseBuildVersion=responseVersionName.split('.').last()
|
||||
val appBuildVersion=BuildConfig.VERSION_NAME.split('.').last()
|
||||
if (responseBuildVersion.toInt()>appBuildVersion.toInt()) Toast.makeText(this, "There is a new application version: $responseVersionName", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
catch (E: Exception)
|
||||
{
|
||||
if (response.isNullOrEmpty()) return@setLastVersionListener
|
||||
val responseVersionName = response.trim(' ', '\n', '\r', '\t')
|
||||
val responseBuildVersion = responseVersionName.split('.').last()
|
||||
val appBuildVersion = BuildConfig.VERSION_NAME.split('.').last()
|
||||
if (responseBuildVersion.toInt() > appBuildVersion.toInt()) Toast.makeText(this, "There is a new application version: $responseVersionName", Toast.LENGTH_LONG).show()
|
||||
} catch (E: Exception) {
|
||||
E.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
|
||||
sp = PreferenceManager.getDefaultSharedPreferences(activity)
|
||||
|
||||
card = TangemCard(activity!!.intent.getStringExtra(TangemCard.EXTRA_CARD))
|
||||
card = TangemCard(activity!!.intent.getStringExtra(TangemCard.EXTRA_UID))
|
||||
card!!.loadFromBundle(activity!!.intent.extras.getBundle(TangemCard.EXTRA_CARD))
|
||||
|
||||
lastTag = activity!!.intent.getParcelableExtra(MainActivity.EXTRA_LAST_DISCOVERED_TAG)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue