Skip to content

Commit

Permalink
[FIX/#63] customClickable 첫번째 클릭이 씹히는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
DongChyeon committed Feb 3, 2025
1 parent ef9237f commit 1967b25
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions core/ui/src/main/java/com/yapp/ui/extensions/CustomClickable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.pointer.pointerInput
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch

@Composable
fun Modifier.customClickable(
Expand All @@ -33,14 +31,10 @@ fun Modifier.customClickable(
this.then(
Modifier
.pointerInput(Unit) {
coroutineScope {
launch {
detectTapGestures(
onTap = { onClick?.invoke() },
onLongPress = { onLongClick?.invoke() },
)
}
}
detectTapGestures(
onTap = { onClick?.invoke() },
onLongPress = { onLongClick?.invoke() },
)
}
.indication(interactionSource, rippleIndication),
)
Expand Down

0 comments on commit 1967b25

Please sign in to comment.