mirror of
https://github.com/SimpleMobileTools/Simple-Thank-You.git
synced 2025-02-16 11:31:34 +01:00
refactor: remove unneeded code
This commit is contained in:
parent
9e0fe725b9
commit
7597be2ba7
@ -45,16 +45,6 @@ internal fun Activity.startCustomizationActivity(
|
|||||||
getAppIconIDs: ArrayList<Int> = getAppIconIDs(),
|
getAppIconIDs: ArrayList<Int> = getAppIconIDs(),
|
||||||
getAppLauncherName: String = launcherName()
|
getAppLauncherName: String = launcherName()
|
||||||
) {
|
) {
|
||||||
if (!packageName.contains("slootelibomelpmis".reversed(), true)) {
|
|
||||||
if (baseConfig.appRunCount > 100) {
|
|
||||||
val label = "You are using a fake version of the app. For your own safety download the original one from www.simplemobiletools.com. Thanks"
|
|
||||||
ConfirmationDialog(this, label, positive = R.string.ok, negative = 0) {
|
|
||||||
launchViewIntent("https://play.google.com/store/apps/dev?id=9070296388022589266")
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent(applicationContext, CustomizationActivity::class.java).apply {
|
Intent(applicationContext, CustomizationActivity::class.java).apply {
|
||||||
putExtra(APP_ICON_IDS, getAppIconIDs)
|
putExtra(APP_ICON_IDS, getAppIconIDs)
|
||||||
putExtra(APP_LAUNCHER_NAME, getAppLauncherName)
|
putExtra(APP_LAUNCHER_NAME, getAppLauncherName)
|
||||||
@ -75,22 +65,6 @@ internal fun Activity.launchChangeAppLanguageIntent() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun Activity.checkWhatsNew(releases: List<Release>, currVersion: Int) {
|
|
||||||
if (baseConfig.lastVersion == 0) {
|
|
||||||
baseConfig.lastVersion = currVersion
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val newReleases = arrayListOf<Release>()
|
|
||||||
releases.filterTo(newReleases) { it.id > baseConfig.lastVersion }
|
|
||||||
|
|
||||||
if (newReleases.isNotEmpty()) {
|
|
||||||
WhatsNewDialog(this, newReleases)
|
|
||||||
}
|
|
||||||
|
|
||||||
baseConfig.lastVersion = currVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getAppIconIDs() = arrayListOf(
|
private fun getAppIconIDs() = arrayListOf(
|
||||||
R.mipmap.ic_launcher_red,
|
R.mipmap.ic_launcher_red,
|
||||||
R.mipmap.ic_launcher_pink,
|
R.mipmap.ic_launcher_pink,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user