feat(follow): 팔로우 해제 확인 팝업을 추가한다

This commit is contained in:
Yu Sung
2026-08-18 11:40:35 +09:00
parent 702d82ebb1
commit 16b1eab206
6 changed files with 150 additions and 50 deletions

View File

@@ -23,6 +23,7 @@ struct CreatorChannelView: View {
@State private var isShowUserBlockConfirm = false
@State private var isShowUserReport = false
@State private var isShowProfileReport = false
@State private var isShowUnfollowConfirmDialog = false
@State private var isCreatorActionMenuPresented = false
@State private var pendingAction: (() -> Void)? = nil
@State private var payload = Payload()
@@ -164,6 +165,10 @@ struct CreatorChannelView: View {
fanTalkDeleteDialog
}
if isShowUnfollowConfirmDialog {
unfollowConfirmDialog
}
if isShowChannelDonationDialog {
LiveRoomDonationDialogView(
isShowing: $isShowChannelDonationDialog,
@@ -273,7 +278,7 @@ struct CreatorChannelView: View {
viewModel.creatorFollow(follow: true, notify: true)
},
onTapUnfollow: {
viewModel.creatorFollow(follow: false, notify: false)
isShowUnfollowConfirmDialog = true
},
onTapNotify: {
viewModel.creatorFollow(follow: true, notify: true)
@@ -443,6 +448,31 @@ struct CreatorChannelView: View {
fanTalkViewModel.selectedFanTalkId = 0
}
private var unfollowConfirmDialog: some View {
SodaV2ActionModal(
title: I18n.MemberChannel.unfollowActionModalTitle,
message: I18n.MemberChannel.unfollowActionModalMessage(viewModel.response?.creator.nickname ?? ""),
button1: SodaV2ActionModalButton(
label: I18n.MemberChannel.unfollowActionModalConfirm,
action: confirmUnfollow
),
button2: SodaV2ActionModalButton(
label: I18n.MemberChannel.unfollowActionModalCancel,
action: dismissUnfollowConfirmDialog
),
onDimmedTap: dismissUnfollowConfirmDialog
)
}
private func confirmUnfollow() {
isShowUnfollowConfirmDialog = false
viewModel.creatorFollow(follow: false, notify: false)
}
private func dismissUnfollowConfirmDialog() {
isShowUnfollowConfirmDialog = false
}
private var authView: some View {
BootpayUI(payload: payload, requestType: BootpayRequest.TYPE_AUTHENTICATION)
.onConfirm { _ in true }