diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index f76f9ed5..68b1e2f5 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -17,8 +17,8 @@ android { applicationId = "com.goms.presentation" minSdk = 26 targetSdk = 33 - versionCode = 11 - versionName = "1.2.3" + versionCode = 12 + versionName = "1.2.4" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/presentation/src/main/java/com/goms/presentation/view/splash/SplashActivity.kt b/presentation/src/main/java/com/goms/presentation/view/splash/SplashActivity.kt index b3827154..d54b508a 100644 --- a/presentation/src/main/java/com/goms/presentation/view/splash/SplashActivity.kt +++ b/presentation/src/main/java/com/goms/presentation/view/splash/SplashActivity.kt @@ -6,8 +6,6 @@ import android.content.SharedPreferences import android.net.ConnectivityManager import android.net.NetworkCapabilities import android.os.Bundle -import android.os.Handler -import android.os.Looper import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.lifecycleScope @@ -47,18 +45,16 @@ class SplashActivity : AppCompatActivity() { } private fun checkInternet() { - Handler(Looper.getMainLooper()).postDelayed({ - if (checkIsInterConnected()) { - setInAppUpdate() - - val userOutingSP = getSharedPreferences("userOuting", MODE_PRIVATE) - if (!userOutingSP.contains("outingStatus")) - initSharedPreference(userOutingSP = userOutingSP) - } else { - val dialog = GomsNetworkDialog(retryLogic = { checkInternet() }) - if (!dialog.isAdded) dialog.show(supportFragmentManager, "network") - } - }, 1000) + if (checkIsInterConnected()) { + setInAppUpdate() + + val userOutingSP = getSharedPreferences("userOuting", MODE_PRIVATE) + if (!userOutingSP.contains("outingStatus")) + initSharedPreference(userOutingSP = userOutingSP) + } else { + val dialog = GomsNetworkDialog(retryLogic = { checkInternet() }) + if (!dialog.isAdded) dialog.show(supportFragmentManager, "network") + } } private fun initSharedPreference(userOutingSP: SharedPreferences) {