Skip to content

Commit

Permalink
Merge pull request #196 from team-haribo/fix/195_fix_server_url
Browse files Browse the repository at this point in the history
🔀 :: (#195) fix server url
  • Loading branch information
ImGaram authored Oct 21, 2023
2 parents 693c2c6 + 2f42ec2 commit e942bac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e942bac

Please sign in to comment.