show "Pro" in the app version at the About section

This commit is contained in:
tibbi 2019-10-13 21:26:40 +02:00
parent 7f608142c7
commit 67559128bf
3 changed files with 7 additions and 2 deletions

View file

@ -7,7 +7,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.18.11'
propVersionName = '5.18.12'
kotlin_version = '1.3.50'
}

View file

@ -187,7 +187,11 @@ class AboutActivity : BaseSimpleActivity() {
}
private fun setupCopyright() {
val versionName = intent.getStringExtra(APP_VERSION_NAME) ?: ""
var versionName = intent.getStringExtra(APP_VERSION_NAME) ?: ""
if (baseConfig.appId.removeSuffix(".debug").endsWith(".pro")) {
versionName += " ${getString(R.string.pro)}"
}
val year = Calendar.getInstance().get(Calendar.YEAR)
about_copyright.text = String.format(getString(R.string.copyright), versionName, year)
}

View file

@ -1,5 +1,6 @@
<resources>
<string name="package_name">com.simplemobiletools.commons</string>
<string name="pro">Pro</string>
<string name="simple_commons">Simple Commons</string>
<string name="progress">%1$s / %2$s</string>
<string name="donate_url">https://simplemobiletools.com/donate</string>