From a4663d0853736f7abdc939bc16efb3a285a780ca Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Tue, 22 Jul 2025 03:19:01 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=20-=20=ED=8C=94=EB=A1=9C=EC=9E=89=20=EC=B1=84?= =?UTF-8?q?=EB=84=90=20=EC=8B=A0=EA=B7=9C=20UI=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EC=A6=88=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/Live/LiveView.swift | 9 +-- SodaLive/Sources/Live/LiveViewModel.swift | 1 - .../SectionRecommendChannelView.swift | 81 +++++++------------ 3 files changed, 31 insertions(+), 60 deletions(-) diff --git a/SodaLive/Sources/Live/LiveView.swift b/SodaLive/Sources/Live/LiveView.swift index 9e8eda9..4a6b749 100644 --- a/SodaLive/Sources/Live/LiveView.swift +++ b/SodaLive/Sources/Live/LiveView.swift @@ -73,13 +73,8 @@ struct LiveView: View { } ) - if viewModel.recommendChannelItems.count > 0 { - SectionRecommendChannelView( - items: viewModel.isFollowingList ? - viewModel.followedChannelItems : - viewModel.recommendChannelItems, - isFollowingList: $viewModel.isFollowingList - ) + if viewModel.followedChannelItems.count > 0 { + SectionRecommendChannelView(items: viewModel.followedChannelItems) } if viewModel.communityPostItems.count > 0 { diff --git a/SodaLive/Sources/Live/LiveViewModel.swift b/SodaLive/Sources/Live/LiveViewModel.swift index 40a822f..4e970e3 100644 --- a/SodaLive/Sources/Live/LiveViewModel.swift +++ b/SodaLive/Sources/Live/LiveViewModel.swift @@ -18,7 +18,6 @@ final class LiveViewModel: ObservableObject { @Published private(set) var liveNowItems = [GetRoomListResponse]() @Published private(set) var liveReservationItems = [GetRoomListResponse]() @Published private(set) var recommendLiveItems: [GetRecommendLiveResponse] = [] - @Published private(set) var recommendChannelItems: [GetRecommendChannelResponse] = [] @Published private(set) var followedChannelItems: [GetRecommendChannelResponse] = [] @Published private(set) var communityPostItems: [GetCommunityPostListResponse] = [] @Published private(set) var replayLiveItems: [AudioContentMainItem] = [] diff --git a/SodaLive/Sources/Live/RecommendChannel/SectionRecommendChannelView.swift b/SodaLive/Sources/Live/RecommendChannel/SectionRecommendChannelView.swift index 5cb3642..edb6658 100644 --- a/SodaLive/Sources/Live/RecommendChannel/SectionRecommendChannelView.swift +++ b/SodaLive/Sources/Live/RecommendChannel/SectionRecommendChannelView.swift @@ -12,46 +12,26 @@ struct SectionRecommendChannelView: View { let items: [GetRecommendChannelResponse] - @Binding var isFollowingList: Bool @AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token) var body: some View { - VStack(spacing: 21.3) { + VStack(spacing: 16) { HStack(spacing: 0) { - if isFollowingList { - Text("팔로잉 ") - .font(.custom(Font.bold.rawValue, size: 18.3)) - .foregroundColor(.grayee) - } else { - Text("추천 ") - .font(.custom(Font.bold.rawValue, size: 18.3)) - .foregroundColor(.grayee) - } - - Text("채널") - .font(.custom(Font.bold.rawValue, size: 18.3)) + Text("팔로잉 ") + .font(.custom(Font.preBold.rawValue, size: 24)) .foregroundColor(.button) - Spacer() + Text("채널") + .font(.custom(Font.preBold.rawValue, size: 24)) + .foregroundColor(.white) - if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { - Text("팔로잉 채널") - .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(.gray77) - - Image(isFollowingList ? "btn_toggle_on_big" : "btn_toggle_off_big") - .resizable() - .frame(width: 33.3, height: 20) - .padding(.leading, 6.7) - .onTapGesture { - isFollowingList.toggle() - } - } + Spacer() } - .frame(width: screenSize().width - 26.7, alignment: .leading) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.horizontal, 24) ScrollView(.horizontal, showsIndicators: false) { - HStack(spacing: 21.3) { + HStack(spacing: 16) { ForEach(0..