feat(live-room): 채팅창 얼리기 기능을 추가한다

채팅 입력 제어와 룸 상태 동기화를 통합해 지연 입장자도 동일 상태를 적용한다.
This commit is contained in:
Yu Sung
2026-03-19 18:20:13 +09:00
parent 0a22f87acc
commit 70003af82b
14 changed files with 466 additions and 29 deletions

View File

@@ -19,6 +19,7 @@ struct LiveRoomInfoHostView: View {
let isOnNotice: Bool
let isOnMenuPan: Bool
let isOnSignature: Bool
let isOnChatFreeze: Bool
let isShowMenuPanButton: Bool
let creatorId: Int
@@ -40,6 +41,7 @@ struct LiveRoomInfoHostView: View {
let onClickTotalHeart: () -> Void
let onClickTotalDonation: () -> Void
let onClickParticipants: () -> Void
let onClickToggleChatFreeze: () -> Void
let onClickToggleSignature: () -> Void
var body: some View {
@@ -55,6 +57,18 @@ struct LiveRoomInfoHostView: View {
) { onClickQuit() }
Spacer()
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnChatFreeze,
onText: I18n.LiveRoom.chatFreezeOn,
onTextColor: Color.button,
onStrokeColor: Color.button,
offText: I18n.LiveRoom.chatFreezeOff,
offTextColor: Color.graybb,
offStrokeColor: Color.graybb,
strokeWidth: 1,
strokeCornerRadius: 5.3
) { onClickToggleChatFreeze() }
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnSignature,
@@ -240,6 +254,7 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
isOnNotice: true,
isOnMenuPan: false,
isOnSignature: false,
isOnChatFreeze: false,
isShowMenuPanButton: false,
creatorId: 1,
creatorNickname: "도화",
@@ -271,6 +286,7 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
onClickTotalHeart: {},
onClickTotalDonation: {},
onClickParticipants: {},
onClickToggleChatFreeze: {},
onClickToggleSignature: {}
)
}