feat(chat): 크리에이터 DM 시작을 추가한다
This commit is contained in:
@@ -124,6 +124,26 @@ struct MainView: View {
|
||||
)
|
||||
}
|
||||
|
||||
if shouldShowChatRecipientSearchButton {
|
||||
VStack {
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
|
||||
CreatorChannelFloatingIconButton(
|
||||
imageName: "ic_plus_no_bg",
|
||||
backgroundColor: Color.soda400,
|
||||
accessibilityLabel: I18n.UserCreatorChatRecipientSearch.openButtonAccessibilityLabel,
|
||||
action: showUserCreatorChatRecipientSearch
|
||||
)
|
||||
.padding(.trailing, SodaSpacing.s14)
|
||||
}
|
||||
}
|
||||
.ignoresSafeArea(.container, edges: .bottom)
|
||||
.padding(.bottom, chatRecipientSearchButtonBottomPadding)
|
||||
}
|
||||
|
||||
if isShowPlayer {
|
||||
ContentPlayerView(isShowing: $isShowPlayer, playlist: [])
|
||||
}
|
||||
@@ -161,6 +181,10 @@ struct MainView: View {
|
||||
UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue && viewModel.currentTab == .home
|
||||
}
|
||||
|
||||
private var shouldShowChatRecipientSearchButton: Bool {
|
||||
UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue && viewModel.currentTab == .chat
|
||||
}
|
||||
|
||||
private var creatorActionMenuBottomPadding: CGFloat {
|
||||
var bottomPadding = mainTabBarHeight + SodaSpacing.s14
|
||||
if contentPlayerPlayManager.isShowingMiniPlayer {
|
||||
@@ -172,6 +196,10 @@ struct MainView: View {
|
||||
return bottomPadding
|
||||
}
|
||||
|
||||
private var chatRecipientSearchButtonBottomPadding: CGFloat {
|
||||
creatorActionMenuBottomPadding
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var contentView: some View {
|
||||
switch viewModel.currentTab {
|
||||
@@ -686,6 +714,10 @@ struct MainView: View {
|
||||
appState.setAppStep(step: .createLive(timeSettingMode: .NOW, onSuccess: handleMainCreateLiveSuccess))
|
||||
}
|
||||
|
||||
private func showUserCreatorChatRecipientSearch() {
|
||||
appState.setAppStep(step: .userCreatorChatRecipientSearch)
|
||||
}
|
||||
|
||||
private func handleMainCreateLiveSuccess(response: CreateLiveRoomResponse) {
|
||||
liveViewModel.getLiveMain()
|
||||
if let _ = response.channelName {
|
||||
|
||||
Reference in New Issue
Block a user