Skip to content

Commit

Permalink
[MERGE] #137 -> develop
Browse files Browse the repository at this point in the history
[FIX/#137] OCR API 결과 분기처리
  • Loading branch information
Marchbreeze committed Sep 18, 2024
2 parents 9264b90 + 8004d80 commit 97fa190
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ object Constants {
const val compileSdk = 34
const val minSdk = 28
const val targetSdk = 34
const val versionCode = 7
const val versionCode = 8
const val versionName = "1.1.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ class HomeFragment() : BaseFragment<FragmentHomeBinding>(featureR.layout.fragmen

private fun initAlarmBtnListener() {
binding.btnAlarm.setOnSingleClickListener {
startActivity(Intent(requireContext(), AlarmActivity::class.java))
if (viewModel.getUserLogined()) {
startActivity(Intent(requireContext(), AlarmActivity::class.java))
} else {
navigationManager.toLoginView(requireContext(), "sell")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ class SellOnboardingViewModel
viewModelScope.launch {
sellRepository.postToCheckProduct(SellCheckRequestModel(uploadedUrl))
.onSuccess {
productId = it.productId
productName = it.productName
productImage = it.imgUrl
_changingImageState.value = UiState.Success(it.productId)
if (it.productId.isNotEmpty()) {
productId = it.productId
productName = it.productName
productImage = it.imgUrl
_changingImageState.value = UiState.Success(it.productId)
} else {
_changingImageState.value = UiState.Failure(it.productId)
}
}
.onFailure {
_changingImageState.value = UiState.Failure(it.message.toString())
Expand Down

0 comments on commit 97fa190

Please sign in to comment.