replace Donate dialog with Upgrade when appropriate
This commit is contained in:
parent
49ba94daf0
commit
d89aad1a3c
2 changed files with 11 additions and 7 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.3.0'
|
||||
propVersionName = '5.3.2'
|
||||
kotlin_version = '1.3.0'
|
||||
}
|
||||
|
||||
|
|
|
@ -108,13 +108,17 @@ fun Activity.appLaunched(appId: String) {
|
|||
}
|
||||
}
|
||||
baseConfig.appRunCount++
|
||||
if (baseConfig.appRunCount % 50 == 0 && !isAProApp()) {
|
||||
showDonateOrUpgradeDialog()
|
||||
}
|
||||
}
|
||||
|
||||
if (!baseConfig.hadThankYouInstalled) {
|
||||
if (isAProApp() || isThankYouInstalled()) {
|
||||
baseConfig.hadThankYouInstalled = true
|
||||
} else if (baseConfig.appRunCount % 50 == 0) {
|
||||
DonateDialog(this)
|
||||
}
|
||||
fun Activity.showDonateOrUpgradeDialog() {
|
||||
val proPackages = arrayListOf("gallery")
|
||||
if (proPackages.contains(baseConfig.appId.removeSuffix(".debug").removePrefix("com.simplemobiletools."))) {
|
||||
UpgradeToProDialog(this)
|
||||
} else if (!baseConfig.hadThankYouInstalled && !isThankYouInstalled()) {
|
||||
DonateDialog(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue