From 740ac5413f69b59d583184514b4601ef963d7d0c Mon Sep 17 00:00:00 2001 From: vrexpert Date: Mon, 23 Oct 2023 15:05:22 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20SingleClick=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/studentverification/StudentVerificationActivity.kt | 3 ++- .../com/festago/festago/presentation/util/SingleClickUtil.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/ui/studentverification/StudentVerificationActivity.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/ui/studentverification/StudentVerificationActivity.kt index 349ec05d4..54004bff5 100644 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/ui/studentverification/StudentVerificationActivity.kt +++ b/android/festago/app/src/main/java/com/festago/festago/presentation/ui/studentverification/StudentVerificationActivity.kt @@ -10,6 +10,7 @@ import com.festago.festago.databinding.ActivityStudentVerificationBinding import com.festago.festago.presentation.ui.customview.OkDialogFragment import com.festago.festago.presentation.ui.home.HomeActivity import com.festago.festago.presentation.util.repeatOnStarted +import com.festago.festago.presentation.util.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint import java.time.LocalTime import java.time.format.DateTimeFormatter @@ -43,7 +44,7 @@ class StudentVerificationActivity : AppCompatActivity() { } private fun initRequestVerificationCodeBtn(schoolId: Long) { - binding.btnRequestVerificationCode.setOnClickListener { + binding.btnRequestVerificationCode.setOnSingleClickListener { vm.sendVerificationCode(binding.tieUserName.text.toString(), schoolId) } } diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/util/SingleClickUtil.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/util/SingleClickUtil.kt index 2b433144b..ae4b96588 100644 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/util/SingleClickUtil.kt +++ b/android/festago/app/src/main/java/com/festago/festago/presentation/util/SingleClickUtil.kt @@ -22,7 +22,7 @@ class OnSingleClickListener( } @BindingAdapter("onSingleClick") -fun View.onSingleClick(onSingleClick: (View) -> Unit) { +fun View.setOnSingleClickListener(onSingleClick: (View) -> Unit) { val oneClick = OnSingleClickListener { onSingleClick(it) }