Skip to content

Commit

Permalink
Removed unused showLoading logic and log
Browse files Browse the repository at this point in the history
  • Loading branch information
burak.ozturk1 committed Jan 13, 2025
1 parent 8dc5a7f commit f7e4b84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.trendyol.uicomponents.quantitypicker

import android.util.Log
import androidx.compose.animation.Animatable
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
Expand All @@ -27,8 +26,7 @@ import kotlinx.coroutines.launch
internal fun QuantityAddIcon(
icons: QuantityIcons,
quantityData: QuantityPickerViewData,
onAddClick: (() -> Unit)?,
showLoading: Boolean
onAddClick: (() -> Unit)?
) {
val coroutineScope = rememberCoroutineScope()
var targetBackgroundColor by remember {
Expand Down Expand Up @@ -60,10 +58,6 @@ internal fun QuantityAddIcon(
}

LaunchedEffect(key1 = quantityData.currentQuantity) {
Log.e(
"XXX",
"quantity = ${quantityData.currentQuantity} lastQ:${lastQuantityCount.value} isLoading:$showLoading"
)
if (lastQuantityCount.value != quantityData.currentQuantity) {
lastQuantityCount.value = quantityData.currentQuantity
iconTintColor = quantityData.getAddIconColor(icons, quantityData.currentQuantity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ internal fun VerticalQuantityPicker(
QuantityAddIcon(
icons = icons,
quantityData = quantityData,
onAddClick = onAddClick,
showLoading = showLoading
onAddClick = onAddClick
)

AnimatedVisibility(visible = quantityData.currentQuantity > 0 || showLoading) {
Expand Down Expand Up @@ -166,8 +165,7 @@ internal fun HorizontalQuantityPicker(
QuantityAddIcon(
icons = icons,
quantityData = quantityData,
onAddClick = onAddClick,
showLoading = showLoading,
onAddClick = onAddClick
)
}
}
Expand Down

0 comments on commit f7e4b84

Please sign in to comment.