updating kotlin, commons, gradle

This commit is contained in:
tibbi
2020-11-07 20:33:14 +01:00
parent eb7f1a125f
commit b253e01e15
4 changed files with 13 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.30.2'
implementation 'com.simplemobiletools:commons:5.31.25'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

View File

@@ -13,10 +13,7 @@ import com.simplemobiletools.applauncher.extensions.dbHelper
import com.simplemobiletools.applauncher.extensions.getNotDisplayedLaunchers
import com.simplemobiletools.applauncher.extensions.isAPredefinedApp
import com.simplemobiletools.applauncher.models.AppLauncher
import com.simplemobiletools.commons.extensions.appLaunched
import com.simplemobiletools.commons.extensions.checkWhatsNew
import com.simplemobiletools.commons.extensions.launchViewIntent
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
@@ -111,9 +108,13 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
val adapter = LaunchersAdapter(this, displayedLaunchers, this, launchers_grid, launchers_fastscroller) {
val launchIntent = packageManager.getLaunchIntentForPackage((it as AppLauncher).packageName)
if (launchIntent != null) {
startActivity(launchIntent)
if (config.closeApp) {
finish()
try {
startActivity(launchIntent)
if (config.closeApp) {
finish()
}
} catch (e: Exception) {
showErrorToast(e)
}
} else {
try {