Skip to content

Commit

Permalink
[feat] #241 중복 클릭 막기
Browse files Browse the repository at this point in the history
  • Loading branch information
jihyunniiii committed Mar 13, 2024
1 parent 30bfd63 commit e2e3598
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.sopt.pingle.util.AmplitudeUtils
import org.sopt.pingle.util.activity.setDoubleBackPressToExit
import org.sopt.pingle.util.base.BindingActivity
import org.sopt.pingle.util.view.UiState
import org.sopt.pingle.util.view.setOnSingleClickListener
import timber.log.Timber

@AndroidEntryPoint
Expand All @@ -44,7 +45,7 @@ class AuthActivity : BindingActivity<ActivityAuthBinding>(R.layout.activity_auth
}

private fun addListeners() {
binding.btnAuthKakao.setOnClickListener {
binding.btnAuthKakao.setOnSingleClickListener {
kakaoAuthService.loginKakao(viewModel::login, viewModel::saveAccount)
AmplitudeUtils.trackEventWithProperty(START_SIGNUP, SIGNUP_TYPE, KAKAO)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import org.sopt.pingle.util.component.PingleSnackbar
import org.sopt.pingle.util.context.hideKeyboard
import org.sopt.pingle.util.context.stringOf
import org.sopt.pingle.util.view.UiState
import org.sopt.pingle.util.view.setOnSingleClickListener
import timber.log.Timber

@AndroidEntryPoint
Expand Down Expand Up @@ -45,10 +46,10 @@ class JoinGroupCodeActivity :
hideKeyboard(binding.etJoinGroupCodeInvitation)
}

binding.btnJoinGroupCodeNext.setOnClickListener {
binding.btnJoinGroupCodeNext.setOnSingleClickListener {
viewModel.joinGroupCodeState(
teamId = teamId,
joinGroupEntity = JoinGroupCodeEntity(viewModel.joinGroupCodeEditText.value.toString())
joinGroupEntity = JoinGroupCodeEntity(viewModel.joinGroupCodeEditText.value)
)

AmplitudeUtils.trackEvent(CLICK_EXISTINGGROUP_ENTER)
Expand Down Expand Up @@ -141,7 +142,7 @@ class JoinGroupCodeActivity :
companion object {
const val TEAM_ID = "teamId"
const val GROUP_NAME = "groupName"
const val LOADING = "Loding"
const val LOADING = "Loading"
const val EMPTY = "Empty"
const val JOIN_GROUP_CODE_ACTIVITY = "JoinGroupCodeActivity"
const val SNACKBAR_BOTTOM_MARGIN = 97
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class MapFragment : BindingFragment<FragmentMapBinding>(R.layout.fragment_map),
private fun makeMarkers(pinEntityList: List<PinEntity>) {
homeViewModel.clearMarkerModelData()

pinEntityList.mapIndexed { index, pinEntity ->
pinEntityList.mapIndexed { _, pinEntity ->
pinEntity.toMarkerModel().apply {
this.marker.apply {
map = naverMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.sopt.pingle.util.component.PingleSnackbar
import org.sopt.pingle.util.fragment.navigateToWebView
import org.sopt.pingle.util.fragment.stringOf
import org.sopt.pingle.util.view.UiState
import org.sopt.pingle.util.view.setOnSingleClickListener
import timber.log.Timber

@AndroidEntryPoint
Expand Down Expand Up @@ -55,11 +56,11 @@ class MoreFragment : BindingFragment<FragmentMoreBinding>(R.layout.fragment_more
}

private fun addListeners() {
binding.tvMoreContactTitle.setOnClickListener {
binding.tvMoreContactTitle.setOnSingleClickListener {
startActivity(navigateToWebView(CONTACT))
}

binding.tvMoreNoticeTitle.setOnClickListener {
binding.tvMoreNoticeTitle.setOnSingleClickListener {
startActivity(navigateToWebView(NOTICE))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.view.View
import org.sopt.pingle.R
import org.sopt.pingle.databinding.DialogAllModalBinding
import org.sopt.pingle.util.base.BindingDialogFragment
import org.sopt.pingle.util.view.setOnSingleClickListener

class AllModalDialogFragment(
private val title: String,
Expand Down Expand Up @@ -42,12 +43,12 @@ class AllModalDialogFragment(
}

private fun addListeners() {
binding.btnAllModalButton.setOnClickListener {
binding.btnAllModalButton.setOnSingleClickListener {
clickBtn()
dismiss()
}

binding.tvAllModalTextButton.setOnClickListener {
binding.tvAllModalTextButton.setOnSingleClickListener {
clickTextBtn()
dismiss()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.sopt.pingle.databinding.BottomCardPingleBinding
import org.sopt.pingle.domain.model.PingleEntity
import org.sopt.pingle.presentation.mapper.isCompleted
import org.sopt.pingle.util.view.DateTimeUtils
import org.sopt.pingle.util.view.setOnSingleClickListener
import org.sopt.pingle.util.view.stringOf

@SuppressLint("CustomViewStyleable")
Expand All @@ -31,11 +32,11 @@ class PingleCardBottom @JvmOverloads constructor(
}

private fun addListeners() {
binding.btnCardBottomMapChat.setOnClickListener {
binding.btnCardBottomMapChat.setOnSingleClickListener {
onChatButtonClick()
}

binding.btnCardBottomMapParticipate.setOnClickListener {
binding.btnCardBottomMapParticipate.setOnClickListener() {
onParticipateButtonClick(pinId)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.sopt.pingle.databinding.DialogPingleModalBinding
import org.sopt.pingle.presentation.type.CategoryType
import org.sopt.pingle.util.base.BindingDialogFragment
import org.sopt.pingle.util.fragment.colorOf
import org.sopt.pingle.util.view.setOnSingleClickListener

class PingleModalDialogFragment(
private val category: CategoryType,
Expand Down Expand Up @@ -39,12 +40,12 @@ class PingleModalDialogFragment(
}

private fun addListeners() {
binding.btnPingleModal.setOnClickListener {
binding.btnPingleModal.setOnSingleClickListener {
clickBtn()
dismiss()
}

binding.layoutPingleModalBackground.setOnClickListener {
binding.layoutPingleModalBackground.setOnSingleClickListener {
dismiss()
}
}
Expand Down

0 comments on commit e2e3598

Please sign in to comment.