From 95c2e992de16215ed78f1be581dd41f48489cbbb Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 5 Nov 2025 16:18:28 +0900 Subject: [PATCH] =?UTF-8?q?fix(live-room):=20=EC=A2=8B=EC=95=84=ED=95=B4?= =?UTF-8?q?=EC=9A=94=20=EB=AF=B8=EA=B0=80=EC=9A=A9=20=EC=8B=9C=20=EB=A1=B1?= =?UTF-8?q?=ED=94=84=EB=A0=88=EC=8A=A4=20=EC=A4=91=EB=8B=A8=20=EB=B0=8F=20?= =?UTF-8?q?=EC=95=88=EB=82=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 하트 버튼 롱프레스 중 이면 즉시 진행 중단 및 로 안내 다이얼로그 표시. - pressing 핸들러에서 시작 즉시 가용성 체크 + 상태 초기화: , , , . - onLongPress 콜백에서도 동일 조건 재검사(2차 방어). 관련 파일: LiveRoomViewV2.swift --- .../Sources/Live/Room/V2/LiveRoomViewV2.swift | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift b/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift index 1c1c4ed..c99b6ae 100644 --- a/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift +++ b/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift @@ -263,13 +263,28 @@ struct LiveRoomViewV2: View { LiveRoomRightBottomButton( imageName: "ic_heart_pink", onClick: { viewModel.likeHeart() }, - onLongPress: { viewModel.likeHeart(messageType: .BIG_HEART_DONATION, heartCount: 100) } + onLongPress: { + if !viewModel.isAvailableLikeHeart { + viewModel.isShowNoticeLikeHeart = true + return + } + viewModel.likeHeart(messageType: .BIG_HEART_DONATION, heartCount: 100) + } ) .onLongPressGesture( minimumDuration: 2.0, maximumDistance: 50, pressing: { pressing in if pressing { + // 좋아해요 사용 가능 여부 체크: 불가 시 즉시 중단하고 안내 노출 + if !viewModel.isAvailableLikeHeart { + isLongPressingHeart = false + showWaterHeart = false + waterProgress = 0 + longPressStartAt = nil + viewModel.isShowNoticeLikeHeart = true + return + } if !isLongPressingHeart { isLongPressingHeart = true longPressStartAt = Date()