Skip to content

Commit 1967b25

Browse files
committed
[FIX/#63] customClickable 첫번째 클릭이 씹히는 문제 해결
1 parent ef9237f commit 1967b25

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

core/ui/src/main/java/com/yapp/ui/extensions/CustomClickable.kt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import androidx.compose.ui.Modifier
1111
import androidx.compose.ui.composed
1212
import androidx.compose.ui.graphics.Color
1313
import androidx.compose.ui.input.pointer.pointerInput
14-
import kotlinx.coroutines.coroutineScope
15-
import kotlinx.coroutines.launch
1614

1715
@Composable
1816
fun Modifier.customClickable(
@@ -33,14 +31,10 @@ fun Modifier.customClickable(
3331
this.then(
3432
Modifier
3533
.pointerInput(Unit) {
36-
coroutineScope {
37-
launch {
38-
detectTapGestures(
39-
onTap = { onClick?.invoke() },
40-
onLongPress = { onLongClick?.invoke() },
41-
)
42-
}
43-
}
34+
detectTapGestures(
35+
onTap = { onClick?.invoke() },
36+
onLongPress = { onLongClick?.invoke() },
37+
)
4438
}
4539
.indication(interactionSource, rippleIndication),
4640
)

0 commit comments

Comments
 (0)