fix(creator): 본인 채널 DM 확인을 추가한다
This commit is contained in:
@@ -123,7 +123,8 @@ struct CreatorChannelAudioTabView: View {
|
||||
.foregroundColor(Color.gray500)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 48)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,11 @@ final class CreatorChannelAudioViewModel: ObservableObject {
|
||||
@Published var isShowPopup = false
|
||||
|
||||
var displayThemes: [CreatorChannelAudioThemeItem] {
|
||||
let themes = response?.themes.map {
|
||||
guard let response else { return [] }
|
||||
|
||||
let themes = response.themes.map {
|
||||
CreatorChannelAudioThemeItem(themeId: $0.themeId, themeName: $0.themeName)
|
||||
} ?? []
|
||||
}
|
||||
|
||||
return [CreatorChannelAudioThemeItem.all] + themes
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ struct CreatorChannelCommunityEmptyView: View {
|
||||
.lineSpacing(SodaSpacing.s4)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top, 316)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 120)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Kingfisher
|
||||
|
||||
struct CreatorChannelHeaderSection: View {
|
||||
let creator: CreatorChannelCreatorResponse
|
||||
let isOwnCreatorChannel: Bool
|
||||
let onTapTalk: () -> Void
|
||||
let onTapDm: () -> Void
|
||||
|
||||
@@ -54,6 +55,7 @@ struct CreatorChannelHeaderSection: View {
|
||||
CreatorChannelTalkActionSection(
|
||||
isAiChatAvailable: creator.isAiChatAvailable,
|
||||
isDmAvailable: creator.isDmAvailable,
|
||||
isOwnCreatorChannel: isOwnCreatorChannel,
|
||||
onTapTalk: onTapTalk,
|
||||
onTapDm: onTapDm
|
||||
)
|
||||
|
||||
@@ -236,6 +236,7 @@ struct CreatorChannelView: View {
|
||||
if let creator = viewModel.response?.creator {
|
||||
CreatorChannelHeaderSection(
|
||||
creator: creator,
|
||||
isOwnCreatorChannel: isOwnCreatorChannel,
|
||||
onTapTalk: handleTalkTap,
|
||||
onTapDm: handleDmTap
|
||||
)
|
||||
@@ -557,6 +558,12 @@ struct CreatorChannelView: View {
|
||||
return
|
||||
}
|
||||
|
||||
if isOwnCreatorChannel {
|
||||
AppState.shared.setPendingMainChatFilter(.dm)
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
return
|
||||
}
|
||||
|
||||
AppState.shared.setAppStep(step: .userCreatorChatCreator(creatorId: creatorId))
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ struct CreatorChannelDonationEmptyView: View {
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 48)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ struct CreatorChannelFanTalkEmptyView: View {
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 48)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import SwiftUI
|
||||
struct CreatorChannelTalkActionSection: View {
|
||||
let isAiChatAvailable: Bool
|
||||
let isDmAvailable: Bool
|
||||
let isOwnCreatorChannel: Bool
|
||||
let onTapTalk: () -> Void
|
||||
let onTapDm: () -> Void
|
||||
|
||||
@@ -37,7 +38,7 @@ struct CreatorChannelTalkActionSection: View {
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text(I18n.CreatorChannelHome.dm)
|
||||
Text(isOwnCreatorChannel ? I18n.CreatorChannelHome.checkDm : I18n.CreatorChannelHome.dm)
|
||||
.appFont(size: 16, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
|
||||
@@ -105,7 +105,8 @@ struct CreatorChannelLiveTabView: View {
|
||||
.foregroundColor(Color.gray500)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 48)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,8 @@ struct CreatorChannelSeriesTabView: View {
|
||||
.foregroundColor(Color.gray500)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 48)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 48)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user