From bf28bdbcd5823d92cce5bbc8bea1b370fcfc4949 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Fri, 6 Sep 2024 01:20:08 +0900 Subject: [PATCH 1/6] =?UTF-8?q?[FIX/#117]=20=ED=8C=90=EB=A7=A4=EC=83=81?= =?UTF-8?q?=EC=84=B8=20dto=20nullable=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/co/orange/data/dto/response/SellInfoDto.kt | 10 +++++----- .../co/orange/domain/entity/response/SellInfoModel.kt | 8 ++++---- .../orange/presentation/sell/info/SellInfoActivity.kt | 2 +- .../orange/presentation/sell/info/SellInfoViewModel.kt | 2 +- .../sell/onboarding/SellOnboardingViewModel.kt | 6 +++++- .../src/main/res/layout/activity_sell_info.xml | 9 +++++---- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/data/src/main/java/co/orange/data/dto/response/SellInfoDto.kt b/data/src/main/java/co/orange/data/dto/response/SellInfoDto.kt index 4c31f1ea..d2e1bd5f 100644 --- a/data/src/main/java/co/orange/data/dto/response/SellInfoDto.kt +++ b/data/src/main/java/co/orange/data/dto/response/SellInfoDto.kt @@ -19,15 +19,15 @@ data class SellInfoDto( @SerialName("salePrice") val salePrice: Int, @SerialName("orderId") - val orderId: String, - @SerialName("buyerNickname") - val buyerNickname: String, + val orderId: String?, + @SerialName("buyerNickName") + val buyerNickname: String?, @SerialName("paidAt") - val paidAt: String, + val paidAt: String?, @SerialName("addressInfo") val addressInfo: AddressInfoDto, @SerialName("paymentMethod") - val paymentMethod: String, + val paymentMethod: String?, ) { fun toModel() = SellInfoModel( diff --git a/domain/src/main/kotlin/co/orange/domain/entity/response/SellInfoModel.kt b/domain/src/main/kotlin/co/orange/domain/entity/response/SellInfoModel.kt index 75c50de0..68d546c0 100644 --- a/domain/src/main/kotlin/co/orange/domain/entity/response/SellInfoModel.kt +++ b/domain/src/main/kotlin/co/orange/domain/entity/response/SellInfoModel.kt @@ -7,9 +7,9 @@ data class SellInfoModel( val imgUrl: String, val originPrice: Int, val salePrice: Int, - val orderId: String, - val buyerNickname: String, - val paidAt: String, + val orderId: String?, + val buyerNickname: String?, + val paidAt: String?, val addressInfo: AddressInfoModel, - val paymentMethod: String, + val paymentMethod: String?, ) diff --git a/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt b/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt index b8fcb058..6b7c7bab 100644 --- a/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt +++ b/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt @@ -89,7 +89,7 @@ class SellInfoActivity : tvInfoDeliveryPhone.text = item.addressInfo.recipientPhone tvInfoTransactionMethod.text = item.paymentMethod tvInfoTransactionDate.text = - item.paidAt.convertDateTime(OLD_DATE_PATTERN, NEW_DATE_PATTERN) + item.paidAt?.convertDateTime(OLD_DATE_PATTERN, NEW_DATE_PATTERN) tvInfoPayKakao.text = item.originPrice.setPriceForm() tvInfoPayReal.text = item.salePrice.setPriceForm() tvInfoPayTotal.text = item.salePrice.setPriceForm() diff --git a/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoViewModel.kt b/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoViewModel.kt index 8a7bce2d..dd72b25d 100644 --- a/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoViewModel.kt +++ b/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoViewModel.kt @@ -28,7 +28,7 @@ class SellInfoViewModel viewModelScope.launch { sellRepository.getItemDetailInfo(itemId) .onSuccess { - orderId = it.orderId + orderId = it.orderId.orEmpty() _getSellInfoState.value = UiState.Success(it) }.onFailure { _getSellInfoState.value = UiState.Failure(it.message.orEmpty()) diff --git a/presentation/src/main/java/co/orange/presentation/sell/onboarding/SellOnboardingViewModel.kt b/presentation/src/main/java/co/orange/presentation/sell/onboarding/SellOnboardingViewModel.kt index b084f4b9..248f45d9 100644 --- a/presentation/src/main/java/co/orange/presentation/sell/onboarding/SellOnboardingViewModel.kt +++ b/presentation/src/main/java/co/orange/presentation/sell/onboarding/SellOnboardingViewModel.kt @@ -54,7 +54,7 @@ class SellOnboardingViewModel viewModelScope.launch { sellRepository.getSignedUrl(selectedImageName) .onSuccess { - uploadedUrl = it.signedUrl + uploadedUrl = URL_GCP + selectedImageName putImageToCloud(it.signedUrl) } .onFailure { @@ -95,4 +95,8 @@ class SellOnboardingViewModel fun resetProductIdState() { _changingImageState.value = UiState.Empty } + + companion object { + private const val URL_GCP = "https://storage.googleapis.com/ddanzi_bucket/" + } } diff --git a/presentation/src/main/res/layout/activity_sell_info.xml b/presentation/src/main/res/layout/activity_sell_info.xml index 2e3d8796..fa392419 100644 --- a/presentation/src/main/res/layout/activity_sell_info.xml +++ b/presentation/src/main/res/layout/activity_sell_info.xml @@ -77,10 +77,10 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" - android:text="@string/sell_info_tv_message" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + tools:text="@string/sell_info_tv_message" /> + app:layout_constraintTop_toBottomOf="@id/tv_info_product_title" + tools:src="@drawable/mock_img_product" /> Date: Fri, 6 Sep 2024 01:54:48 +0900 Subject: [PATCH 2/6] =?UTF-8?q?[FIX/#117]=20=ED=8C=90=EB=A7=A4=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=EB=B7=B0=20=EC=83=81=ED=83=9C=EB=B3=84=20=EB=B6=84?= =?UTF-8?q?=EA=B8=B0=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/co/orange/presentation/sell/info/SellInfoActivity.kt | 2 +- presentation/src/main/res/layout/activity_sell_info.xml | 2 +- presentation/src/main/res/values/strings.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt b/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt index 6b7c7bab..8a73ed76 100644 --- a/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt +++ b/presentation/src/main/java/co/orange/presentation/sell/info/SellInfoActivity.kt @@ -127,7 +127,7 @@ class SellInfoActivity : btnSellConfirm.setText(btnTextResId) btnSellConfirm.isEnabled = isButtonEnabled ivSellToast.isVisible = isButtonEnabled - if (status != ItemStatus.ON_SALE.name) { + if (status == ItemStatus.ON_SALE.name) { tvInfoTransaction.isVisible = false layoutInfoBuyer.isVisible = false layoutInfoDelivery.isVisible = false diff --git a/presentation/src/main/res/layout/activity_sell_info.xml b/presentation/src/main/res/layout/activity_sell_info.xml index fa392419..df6608d9 100644 --- a/presentation/src/main/res/layout/activity_sell_info.xml +++ b/presentation/src/main/res/layout/activity_sell_info.xml @@ -408,7 +408,7 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="22dp" android:layout_marginBottom="30dp" - android:background="@drawable/shape_black_fill_10_rect" + android:background="@drawable/sel_btn" android:enabled="false" android:gravity="center" android:paddingVertical="16dp" diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 22202d09..dbe0e088 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -170,7 +170,7 @@ 상품 등록 완료 상품 등록이 완료되었습니다. - 주문 확인 후 거래가 진행됩니다. 근데 여기서 뭔가 설명문을 좀 적어야 할 것 같은데? + 주문 확인 후 거래가 진행됩니다.\n거래가 성사되면 판매를 확정해주세요. 상품 등록 확인 상품 추가 등록 From 42c0f57e20442558bcfacfcba63a0b1dea2f6b1c Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Fri, 6 Sep 2024 02:43:03 +0900 Subject: [PATCH 3/6] =?UTF-8?q?[FIX/#117]=20=EB=AF=B8=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?depencencies=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 -- build.gradle.kts | 1 - buildSrc/src/main/kotlin/Dependencies.kt | 24 ++++++++---------------- buildSrc/src/main/kotlin/Versions.kt | 4 +--- core/build.gradle.kts | 4 ++-- presentation/build.gradle.kts | 5 ++--- 6 files changed, 13 insertions(+), 27 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ce380077..d624efb5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,7 +6,6 @@ plugins { kotlin("kapt") id("kotlin-parcelize") id("dagger.hilt.android.plugin") - id("com.google.android.gms.oss-licenses-plugin") } android { @@ -108,7 +107,6 @@ dependencies { implementation(retrofit) implementation(retrofitJsonConverter) implementation(timber) - implementation(ossLicense) } KakaoDependencies.run { diff --git a/build.gradle.kts b/build.gradle.kts index bdb5eb82..c5a9d7e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,6 @@ buildscript { classpath(ClassPathPlugins.gradle) classpath(ClassPathPlugins.kotlinGradle) classpath(ClassPathPlugins.hilt) - classpath(ClassPathPlugins.oss) } } diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 97fd1339..fe02c531 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -30,10 +30,8 @@ object AndroidXDependencies { "androidx.lifecycle:lifecycle-common-java8:${Versions.lifecycleVersion}" const val workManager = "androidx.work:work-runtime-ktx:${Versions.workManagerVersion}" - const val hiltWorkManager = "androidx.hilt:hilt-work:1.0.0" + const val hiltWorkManager = "androidx.hilt:hilt-work:${Versions.hiltWorkVersion}" const val hilt = "com.google.dagger:hilt-android:${Versions.hiltVersion}" - const val ossLicense = - "com.google.android.gms:play-services-oss-licenses:${Versions.ossVersion}" } object TestDependencies { @@ -42,41 +40,36 @@ object TestDependencies { const val espresso = "androidx.test.espresso:espresso-core:${Versions.espressoVersion}" } -object MaterialDesignDependencies { +object GoogleDependencies { const val materialDesign = "com.google.android.material:material:${Versions.materialDesignVersion}" + const val mlkit = "com.google.mlkit:text-recognition-korean:${Versions.mlkitVersion}" } object KaptDependencies { const val hiltAndroidCompiler = "com.google.dagger:hilt-compiler:${Versions.hiltVersion}" const val hiltCompiler = "com.google.dagger:hilt-compiler:${Versions.hiltVersion}" - const val hiltWorkManagerCompiler = "androidx.hilt:hilt-compiler:1.0.0" + const val hiltWorkManagerCompiler = "androidx.hilt:hilt-compiler:${Versions.hiltWorkVersion}" } object ThirdPartyDependencies { - const val coil = "io.coil-kt:coil:${Versions.coilVersion}" - const val retrofit = "com.squareup.retrofit2:retrofit:${Versions.retrofitVersion}" const val retrofitJsonConverter = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:${Versions.kotlinSerializationConverterVersion}" + const val okHttpBom = "com.squareup.okhttp3:okhttp-bom:${Versions.okHttpVersion}" const val okHttp = "com.squareup.okhttp3:okhttp" const val okHttpLoggingInterceptor = "com.squareup.okhttp3:logging-interceptor" const val timber = "com.jakewharton.timber:timber:${Versions.timberVersion}" - - const val ossLicense = - "com.google.android.gms:play-services-oss-licenses:${Versions.ossVersion}" + const val coil = "io.coil-kt:coil:${Versions.coilVersion}" + const val lottie = "com.airbnb.android:lottie:${Versions.lottieVersion}" const val progressView = "com.github.skydoves:progressview:${Versions.progressViewVersion}" const val balloon = "com.github.skydoves:balloon:${Versions.balloonVersion}" - const val lottie = "com.airbnb.android:lottie:${Versions.lottieVersion}" + const val circleIndicator = "me.relex:circleindicator:${Versions.circleIndicatorVersion}" const val circularProgressBar = "com.mikhaellopez:circularprogressbar:${Versions.circularProgressBar}" - const val circleIndicator = "me.relex:circleindicator:${Versions.circleIndicatorVersion}" - const val shimmer = "com.facebook.shimmer:shimmer:${Versions.shimmerVersion}" - - const val mlkit = "com.google.mlkit:text-recognition-korean:${Versions.mlkitVersion}" } object JitpackDependencies { @@ -87,7 +80,6 @@ object ClassPathPlugins { const val gradle = "com.android.tools.build:gradle:${Versions.gradleVersion}" const val kotlinGradle = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinVersion}" const val hilt = "com.google.dagger:hilt-android-gradle-plugin:${Versions.hiltVersion}" - const val oss = "com.google.android.gms:oss-licenses-plugin:${Versions.ossPluginVersion}" } object FirebaseDependencies { diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index f69b779d..3be61d83 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -14,13 +14,12 @@ object Versions { const val legacySupportVersion = "1.0.0" const val securityVersion = "1.1.0-alpha06" const val hiltVersion = "2.46.1" + const val hiltWorkVersion = "1.0.0" const val fragmentKtxVersion = "1.5.7" const val navigationVersion = "2.7.7" const val webkitVersion = "1.8.0" const val coroutinesAndroidVersion = "1.7.1" const val lifecycleVersion = "2.6.1" - const val ossPluginVersion = "0.10.4" - const val ossVersion = "17.0.0" const val splashVersion = "1.0.1" const val workManagerVersion = "2.8.1" const val coilVersion = "2.4.0" @@ -34,7 +33,6 @@ object Versions { const val circularProgressBar = "3.1.0" const val kakaoVersion = "2.20.3" const val circleIndicatorVersion = "2.1.6" - const val shimmerVersion = "0.5.0" const val mlkitVersion = "16.0.0" const val iamportVersion = "v1.4.5" diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 9ae9393b..916bf83b 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -37,7 +37,7 @@ dependencies { implementation(AndroidXDependencies.lifeCycleKtx) // Material Design - implementation(MaterialDesignDependencies.materialDesign) + implementation(GoogleDependencies.materialDesign) // Hilt implementation(AndroidXDependencies.hilt) @@ -47,4 +47,4 @@ dependencies { testImplementation(TestDependencies.jUnit) androidTestImplementation(TestDependencies.androidTest) androidTestImplementation(TestDependencies.espresso) -} \ No newline at end of file +} diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index 2804b62c..792289e2 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -88,8 +88,9 @@ dependencies { kapt(hiltWorkManagerCompiler) } - MaterialDesignDependencies.run { + GoogleDependencies.run { implementation(materialDesign) + implementation(mlkit) } TestDependencies.run { @@ -101,13 +102,11 @@ dependencies { ThirdPartyDependencies.run { implementation(coil) implementation(timber) - implementation(ossLicense) implementation(progressView) implementation(balloon) implementation(lottie) implementation(circularProgressBar) implementation(circleIndicator) - implementation(mlkit) } JitpackDependencies.run { From a69ab9f07d29db9aeae95134c07e69a5381783ef Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Fri, 6 Sep 2024 02:59:25 +0900 Subject: [PATCH 4/6] =?UTF-8?q?[ADD/#117]=20AppUpdate=20Dependency=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/kotlin/Dependencies.kt | 1 + buildSrc/src/main/kotlin/Versions.kt | 1 + presentation/build.gradle.kts | 1 + 3 files changed, 3 insertions(+) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index fe02c531..e091cddd 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -44,6 +44,7 @@ object GoogleDependencies { const val materialDesign = "com.google.android.material:material:${Versions.materialDesignVersion}" const val mlkit = "com.google.mlkit:text-recognition-korean:${Versions.mlkitVersion}" + const val appUpdate = "com.google.android.play:app-update-ktx:${Versions.appUpdateVersion}" } object KaptDependencies { diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 3be61d83..3d1bc2e4 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -34,6 +34,7 @@ object Versions { const val kakaoVersion = "2.20.3" const val circleIndicatorVersion = "2.1.6" const val mlkitVersion = "16.0.0" + const val appUpdateVersion = "2.1.0" const val iamportVersion = "v1.4.5" diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index 792289e2..d0f9a606 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -91,6 +91,7 @@ dependencies { GoogleDependencies.run { implementation(materialDesign) implementation(mlkit) + implementation(appUpdate) } TestDependencies.run { From 7cf6a4aff71e9b9f7d74690b907a31d73454cab3 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Fri, 6 Sep 2024 03:29:24 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[FEAT/#117]=20=EC=9D=B8=EC=95=B1=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/splash/SplashActivity.kt | 76 ++++++++++++++++--- 1 file changed, 64 insertions(+), 12 deletions(-) diff --git a/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt b/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt index a20560aa..bc08f2b1 100644 --- a/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt +++ b/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt @@ -3,42 +3,94 @@ package co.orange.presentation.splash import android.app.AlertDialog import android.content.Intent import android.os.Bundle +import androidx.activity.result.ActivityResultLauncher +import androidx.activity.result.IntentSenderRequest +import androidx.activity.result.contract.ActivityResultContracts import androidx.lifecycle.lifecycleScope import co.orange.core.base.BaseActivity import co.orange.core.extension.setNavigationBarColorFromResource import co.orange.core.extension.setStatusBarColorFromResource +import co.orange.core.extension.toast import co.orange.presentation.main.MainActivity +import com.google.android.play.core.appupdate.AppUpdateInfo +import com.google.android.play.core.appupdate.AppUpdateManagerFactory +import com.google.android.play.core.appupdate.AppUpdateOptions +import com.google.android.play.core.install.model.AppUpdateType.IMMEDIATE +import com.google.android.play.core.install.model.UpdateAvailability.UPDATE_AVAILABLE import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.delay import kotlinx.coroutines.launch +import kr.genti.presentation.BuildConfig import kr.genti.presentation.R import kr.genti.presentation.databinding.ActivitySplashBinding @AndroidEntryPoint class SplashActivity : BaseActivity(R.layout.activity_splash) { + private val appUpdateManager by lazy { AppUpdateManagerFactory.create(this) } + + private val activityResultLauncher: ActivityResultLauncher = + registerForActivityResult(ActivityResultContracts.StartIntentSenderForResult()) { + if (it.resultCode != RESULT_OK) { + toast("업데이트가 취소되었습니다.") + finishAffinity() + } + } + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setStatusBarColor() - setNavigationBarColor() + setStatusBarColorFromResource(R.color.black) + setNavigationBarColorFromResource(R.color.black) + } + + override fun onResume() { + super.onResume() checkConnectedNetwork() } - private fun setStatusBarColor() = setStatusBarColorFromResource(R.color.black) + private fun checkConnectedNetwork() { + if (NetworkManager.checkNetworkState(this@SplashActivity)) { + checkAppUpdateAvailable() + } else { + showNetworkErrorAlertDialog() + } + } + + private fun checkAppUpdateAvailable() { + if (BuildConfig.DEBUG) { + navigateToMain() + } else { + appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> + if (isAppUpdateNeeded(appUpdateInfo)) { + requestUpdate(appUpdateInfo) + } else { + navigateToMain() + } + } + } + } + + private fun isAppUpdateNeeded(appUpdateInfo: AppUpdateInfo) = + appUpdateInfo.updateAvailability() == UPDATE_AVAILABLE && + appUpdateInfo.isUpdateTypeAllowed(IMMEDIATE) - private fun setNavigationBarColor() = setNavigationBarColorFromResource(R.color.black) + private fun requestUpdate(appUpdateInfo: AppUpdateInfo) { + runCatching { + appUpdateManager.startUpdateFlowForResult( + appUpdateInfo, + activityResultLauncher, + AppUpdateOptions.newBuilder(IMMEDIATE).build(), + ) + } + } - private fun checkConnectedNetwork() { + private fun navigateToMain() { lifecycleScope.launch { delay(DELAY_TIME) - if (NetworkManager.checkNetworkState(this@SplashActivity)) { - Intent(this@SplashActivity, MainActivity::class.java).apply { - startActivity(this) - } - finish() - } else { - showNetworkErrorAlertDialog() + Intent(this@SplashActivity, MainActivity::class.java).apply { + startActivity(this) } + finish() } } From a3845b0b966289b8759304abee3f1c9159b8c18e Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Fri, 6 Sep 2024 03:41:42 +0900 Subject: [PATCH 6/6] =?UTF-8?q?[CHORE/#117]=20version=20code=201.0.2=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/kotlin/Constants.kt | 4 ++-- .../main/java/co/orange/presentation/splash/SplashActivity.kt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/Constants.kt b/buildSrc/src/main/kotlin/Constants.kt index 53c1ee82..74826f23 100644 --- a/buildSrc/src/main/kotlin/Constants.kt +++ b/buildSrc/src/main/kotlin/Constants.kt @@ -3,6 +3,6 @@ object Constants { const val compileSdk = 34 const val minSdk = 28 const val targetSdk = 34 - const val versionCode = 4 - const val versionName = "1.0.1" + const val versionCode = 5 + const val versionName = "1.0.2" } diff --git a/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt b/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt index bc08f2b1..09d1ecf0 100644 --- a/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt +++ b/presentation/src/main/java/co/orange/presentation/splash/SplashActivity.kt @@ -66,6 +66,9 @@ class SplashActivity : BaseActivity(R.layout.activity_spl } else { navigateToMain() } + }.addOnFailureListener { + toast("업데이트에 실패했습니다.") + navigateToMain() } } }