fix(creator): 팬Talk 액션 팝업을 정리한다
This commit is contained in:
@@ -30,7 +30,6 @@ struct CreatorChannelFanTalkTabView: View {
|
||||
}
|
||||
.sodaToast(isPresented: $viewModel.isShowPopup, message: viewModel.errorMessage, autohideIn: 1)
|
||||
.overlay(reportDialog)
|
||||
.overlay(deleteDialog)
|
||||
}
|
||||
|
||||
private var content: some View {
|
||||
@@ -100,9 +99,9 @@ struct CreatorChannelFanTalkTabView: View {
|
||||
let itemFrame = fanTalkItemFrames[fanTalk.fanTalkId] {
|
||||
let isMine = fanTalk.writerId == UserDefaults.int(forKey: .userId)
|
||||
|
||||
CreatorChannelFanTalkActionPopup(
|
||||
isMine: isMine,
|
||||
isOwnCreatorChannel: isOwnCreatorChannel,
|
||||
CreatorChannelActionPopup(
|
||||
canEdit: isMine,
|
||||
canDelete: isMine || isOwnCreatorChannel,
|
||||
onTapEdit: {
|
||||
actionPopupFanTalk = nil
|
||||
onTapEdit(fanTalk)
|
||||
@@ -110,7 +109,9 @@ struct CreatorChannelFanTalkTabView: View {
|
||||
onTapDelete: {
|
||||
actionPopupFanTalk = nil
|
||||
viewModel.presentDeleteDialog(fanTalkId: fanTalk.fanTalkId)
|
||||
}
|
||||
},
|
||||
editTitle: I18n.Explorer.editAction,
|
||||
deleteTitle: I18n.Explorer.deleteAction
|
||||
)
|
||||
.padding(.top, itemFrame.minY + 44)
|
||||
.padding(.trailing, SodaSpacing.s14)
|
||||
@@ -134,26 +135,6 @@ struct CreatorChannelFanTalkTabView: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var deleteDialog: some View {
|
||||
if viewModel.isShowDeleteDialog {
|
||||
SodaDialog(
|
||||
title: I18n.MemberChannel.cheersDeleteTitle,
|
||||
desc: I18n.Common.confirmDeleteQuestion,
|
||||
confirmButtonTitle: I18n.Common.delete,
|
||||
confirmButtonAction: {
|
||||
viewModel.isShowDeleteDialog = false
|
||||
viewModel.deleteSelectedFanTalk(creatorId: creatorId)
|
||||
},
|
||||
cancelButtonTitle: I18n.Common.cancel,
|
||||
cancelButtonAction: {
|
||||
viewModel.isShowDeleteDialog = false
|
||||
viewModel.selectedFanTalkId = 0
|
||||
},
|
||||
textAlignment: .center
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private static let coordinateSpaceName = "CreatorChannelFanTalkTabView"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user