diff --git a/SodaLive.xcodeproj/project.pbxproj b/SodaLive.xcodeproj/project.pbxproj index 7adb34f7..b4893f88 100644 --- a/SodaLive.xcodeproj/project.pbxproj +++ b/SodaLive.xcodeproj/project.pbxproj @@ -8946,7 +8946,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.55.1; + MARKETING_VERSION = 1.55.2; PRODUCT_BUNDLE_IDENTIFIER = kr.co.vividnext.sodalive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -8987,7 +8987,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.55.1; + MARKETING_VERSION = 1.55.2; PRODUCT_BUNDLE_IDENTIFIER = kr.co.vividnext.sodalive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/SodaLive/Sources/I18n/I18n.swift b/SodaLive/Sources/I18n/I18n.swift index 984472f0..472bdc3a 100644 --- a/SodaLive/Sources/I18n/I18n.swift +++ b/SodaLive/Sources/I18n/I18n.swift @@ -3546,6 +3546,10 @@ If you block this user, the following features will be restricted. pick(ko: "현재 라이브", en: "Live now", ja: "現在ライブ") } + static var liveAll: String { + pick(ko: "전체", en: "All", ja: "すべて") + } + static var activeCreatorSectionTitle: String { pick(ko: "방금 활동한 크리에이터", en: "Recently active creators", ja: "最近活動したクリエイター") } diff --git a/SodaLive/Sources/V2/Main/Home/MainHomeView.swift b/SodaLive/Sources/V2/Main/Home/MainHomeView.swift index d006547e..133cea42 100644 --- a/SodaLive/Sources/V2/Main/Home/MainHomeView.swift +++ b/SodaLive/Sources/V2/Main/Home/MainHomeView.swift @@ -10,6 +10,7 @@ struct MainHomeView: View { let onTapCharacter: (Int) -> Void let onTapCommunityPost: (Int) -> Void let onTapBanner: (RecommendationBannerResponse) -> Void + let onTapLiveAll: () -> Void let onTapFollowAll: (@escaping () -> Void) -> Void let onSelectFollowingTab: () -> Bool let onTapFollowingLogin: () -> Void @@ -71,6 +72,7 @@ struct MainHomeView: View { onTapCharacter: onTapCharacter, onTapCommunityPost: onTapCommunityPost, onTapBanner: onTapBanner, + onTapLiveAll: onTapLiveAll, onTapFollowAll: onTapFollowAll ) case .ranking: @@ -120,6 +122,7 @@ struct MainHomeView_Previews: PreviewProvider { onTapCharacter: { _ in }, onTapCommunityPost: { _ in }, onTapBanner: { _ in }, + onTapLiveAll: {}, onTapFollowAll: { action in action() }, onSelectFollowingTab: { true }, onTapFollowingLogin: {}, diff --git a/SodaLive/Sources/V2/Main/Home/Recommendation/Components/MainHomeLiveSection.swift b/SodaLive/Sources/V2/Main/Home/Recommendation/Components/MainHomeLiveSection.swift index 926102ef..bd325113 100644 --- a/SodaLive/Sources/V2/Main/Home/Recommendation/Components/MainHomeLiveSection.swift +++ b/SodaLive/Sources/V2/Main/Home/Recommendation/Components/MainHomeLiveSection.swift @@ -3,6 +3,7 @@ import SwiftUI struct MainHomeLiveSection: View { let items: [HomeLiveItem] let onTapLive: (Int) -> Void + let onTapAll: () -> Void var body: some View { if !items.isEmpty { @@ -11,6 +12,8 @@ struct MainHomeLiveSection: View { ForEach(items, id: \.self) { item in MainHomeLiveItemView(item: item, onTapLive: onTapLive) } + + MainHomeLiveAllItemView(onTapAll: onTapAll) } .padding(.horizontal, SodaSpacing.s20) } @@ -54,6 +57,27 @@ private struct MainHomeLiveItemView: View { } } +private struct MainHomeLiveAllItemView: View { + let onTapAll: () -> Void + + var body: some View { + Button(action: onTapAll) { + VStack(alignment: .center, spacing: SodaSpacing.s6) { + Circle() + .fill(Color.gray800) + .frame(width: 70, height: 70) + .overlay { + Text(I18n.HomeRecommendation.liveAll) + .appFont(.body4) + .foregroundColor(.white) + } + } + .frame(width: 70, height: 102, alignment: .top) + } + .buttonStyle(.plain) + } +} + struct MainHomeLiveSection_Previews: PreviewProvider { private static let previewImageUrl = "https://picsum.photos/500/500" @@ -72,7 +96,8 @@ struct MainHomeLiveSection_Previews: PreviewProvider { HomeLiveItem(roomId: 1, creatorNickname: "설린", creatorProfileImage: previewImageUrl), HomeLiveItem(roomId: 2, creatorNickname: "크리에이터", creatorProfileImage: previewImageUrl) ], - onTapLive: { _ in } + onTapLive: { _ in }, + onTapAll: {} ) .padding(.vertical, SodaSpacing.s20) .background(Color.black) diff --git a/SodaLive/Sources/V2/Main/Home/Recommendation/MainHomeRecommendationView.swift b/SodaLive/Sources/V2/Main/Home/Recommendation/MainHomeRecommendationView.swift index d52bb888..624aba4c 100644 --- a/SodaLive/Sources/V2/Main/Home/Recommendation/MainHomeRecommendationView.swift +++ b/SodaLive/Sources/V2/Main/Home/Recommendation/MainHomeRecommendationView.swift @@ -7,6 +7,7 @@ struct MainHomeRecommendationView: View { let onTapCharacter: (Int) -> Void let onTapCommunityPost: (Int) -> Void let onTapBanner: (RecommendationBannerResponse) -> Void + let onTapLiveAll: () -> Void let onTapFollowAll: (@escaping () -> Void) -> Void @StateObject private var viewModel = MainHomeRecommendationViewModel() @@ -25,7 +26,8 @@ struct MainHomeRecommendationView: View { VStack(alignment: .leading, spacing: SodaSpacing.s24) { MainHomeLiveSection( items: viewModel.recommendations?.lives ?? [], - onTapLive: onTapLive + onTapLive: onTapLive, + onTapAll: onTapLiveAll ) MainHomeBannerSection( @@ -122,6 +124,7 @@ struct MainHomeRecommendationView_Previews: PreviewProvider { onTapCharacter: { _ in }, onTapCommunityPost: { _ in }, onTapBanner: { _ in }, + onTapLiveAll: {}, onTapFollowAll: { action in action() } ) } diff --git a/SodaLive/Sources/V2/Main/MainView.swift b/SodaLive/Sources/V2/Main/MainView.swift index b45e1917..a64b76dc 100644 --- a/SodaLive/Sources/V2/Main/MainView.swift +++ b/SodaLive/Sources/V2/Main/MainView.swift @@ -180,6 +180,7 @@ struct MainView: View { onTapCharacter: handleRecommendationCreatorTap, onTapCommunityPost: handleRecommendationCommunityPostTap, onTapBanner: handleRecommendationBannerTap, + onTapLiveAll: handleRecommendationLiveAllTap, onTapFollowAll: handleRecommendationFollowAllTap, onSelectFollowingTab: handleFollowingTabSelection, onTapFollowingLogin: handleFollowingLoginTap, @@ -483,6 +484,10 @@ struct MainView: View { } } + private func handleRecommendationLiveAllTap() { + appState.setAppStep(step: .liveNowAll(onClickParticipant: handleRecommendationLiveTap)) + } + private func handleRecommendationCreatorTap(creatorId: Int) { guard creatorId > 0 else { return } performRecommendationDetailAction {