From 7597be2ba77576ca86f32b96463db1680b9e9cd5 Mon Sep 17 00:00:00 2001 From: FunkyMuse Date: Fri, 6 Oct 2023 14:39:36 +0200 Subject: [PATCH] refactor: remove unneeded code --- .../thankyou/extensions/Context.kt | 30 ++----------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/extensions/Context.kt index a931ad3..e6983fb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/thankyou/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/extensions/Context.kt @@ -26,7 +26,7 @@ val Context.config: Config get() = Config.newInstance(applicationContext) internal fun Activity.startAboutActivity( appNameId: Int, licenseMask: Long, versionName: String, faqItems: ArrayList, showFAQBeforeMail: Boolean, getAppIconIDs: ArrayList = getAppIconIDs(), - getAppLauncherName : String = launcherName() + getAppLauncherName: String = launcherName() ) { hideKeyboard() Intent(applicationContext, AboutActivity::class.java).apply { @@ -43,18 +43,8 @@ internal fun Activity.startAboutActivity( internal fun Activity.startCustomizationActivity( getAppIconIDs: ArrayList = 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 { putExtra(APP_ICON_IDS, getAppIconIDs) putExtra(APP_LAUNCHER_NAME, getAppLauncherName) @@ -75,22 +65,6 @@ internal fun Activity.launchChangeAppLanguageIntent() { } } -internal fun Activity.checkWhatsNew(releases: List, currVersion: Int) { - if (baseConfig.lastVersion == 0) { - baseConfig.lastVersion = currVersion - return - } - - val newReleases = arrayListOf() - releases.filterTo(newReleases) { it.id > baseConfig.lastVersion } - - if (newReleases.isNotEmpty()) { - WhatsNewDialog(this, newReleases) - } - - baseConfig.lastVersion = currVersion -} - private fun getAppIconIDs() = arrayListOf( R.mipmap.ic_launcher_red, R.mipmap.ic_launcher_pink,