라이브 방
- 스피커 수가 증가함에 따라 UI가 화면에서 넘치던 버그 수정
This commit is contained in:
@@ -108,23 +108,28 @@ struct LiveRoomInfoGuestView: View {
|
||||
onClickFollow: { onClickFollow(isFollowing) },
|
||||
onClickProfile: { onClickProfile(creatorId) }
|
||||
)
|
||||
.frame(width: 180, alignment: .leading)
|
||||
|
||||
Spacer()
|
||||
|
||||
ForEach(0..<speakerList.count, id: \.self) { index in
|
||||
let speaker = speakerList[index]
|
||||
|
||||
if speaker.id != UInt(creatorId) {
|
||||
LiveRoomInfoSpeakerView(
|
||||
nickname: speaker.nickname,
|
||||
profileUrl: speaker.profileImage,
|
||||
isMute: muteSpeakerList.contains(UInt(speaker.id)),
|
||||
isActiveSpeaker: activeSpeakerList.contains(UInt(speaker.id)),
|
||||
onClickProfile: { onClickProfile(speaker.id) }
|
||||
)
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 8) {
|
||||
ForEach(0..<speakerList.count, id: \.self) { index in
|
||||
let speaker = speakerList[index]
|
||||
|
||||
if speaker.id != UInt(creatorId) {
|
||||
LiveRoomInfoSpeakerView(
|
||||
nickname: speaker.nickname,
|
||||
profileUrl: speaker.profileImage,
|
||||
isMute: muteSpeakerList.contains(UInt(speaker.id)),
|
||||
isActiveSpeaker: activeSpeakerList.contains(UInt(speaker.id)),
|
||||
onClickProfile: { onClickProfile(speaker.id) }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
.rotationEffect(Angle(degrees: 180))
|
||||
}
|
||||
.rotationEffect(Angle(degrees: 180))
|
||||
}
|
||||
|
||||
HStack(spacing: 5.3) {
|
||||
@@ -184,13 +189,19 @@ struct LiveRoomInfoGuestView: View {
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.top, 16)
|
||||
.background(Color.gray22)
|
||||
.onAppear {
|
||||
UIScrollView.appearance().bounces = false
|
||||
}
|
||||
.onDisappear {
|
||||
UIScrollView.appearance().bounces = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomInfoGuestView(
|
||||
title: "오늘의 라이브방송은 OOO입니다.",
|
||||
title: "qwer",
|
||||
totalDonationCan: 123456,
|
||||
isOnBg: true,
|
||||
isOnNotice: false,
|
||||
@@ -218,25 +229,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
nickname: "LUNA",
|
||||
profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310",
|
||||
role: .SPEAKER
|
||||
),
|
||||
LiveRoomMember(
|
||||
id: 4,
|
||||
nickname: "도화",
|
||||
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
role: .SPEAKER
|
||||
),
|
||||
LiveRoomMember(
|
||||
id: 5,
|
||||
nickname: "도화",
|
||||
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
role: .SPEAKER
|
||||
),
|
||||
LiveRoomMember(
|
||||
id: 6,
|
||||
nickname: "도화",
|
||||
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
role: .SPEAKER
|
||||
),
|
||||
)
|
||||
],
|
||||
muteSpeakerList: [],
|
||||
activeSpeakerList: [],
|
||||
|
Reference in New Issue
Block a user