콘텐츠 상세 - 크리에이터 팔로우와 알림설정
- 팔로잉 상태에서 알림 켜기/끄기 상태 추가
This commit is contained in:
@@ -19,6 +19,15 @@ struct ContentDetailView: View {
|
||||
@State private var isShowOrderView = false
|
||||
@State private var isShowOrderConfirmView = false
|
||||
@State private var isShowCommentListView = false
|
||||
@State private var isShowFollowNotifyDialog: Bool = false {
|
||||
didSet {
|
||||
if !isShowFollowNotifyDialog {
|
||||
creatorId = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@State private var creatorId: Int = 0
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { proxy in
|
||||
@@ -55,8 +64,11 @@ struct ContentDetailView: View {
|
||||
if let audioContent = viewModel.audioContent {
|
||||
ContentDetailCreatorProfileView(
|
||||
creator: audioContent.creator,
|
||||
onClickFollow: { viewModel.creatorFollow(userId: $0) },
|
||||
onClickUnFollow: { viewModel.creatorUnFollow(userId: $0) }
|
||||
onClickFollow: { viewModel.creatorFollow(creatorId: $0) },
|
||||
showCreatorFollowNotifyDialog: {
|
||||
creatorId = $0
|
||||
isShowFollowNotifyDialog = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.top, 5.3)
|
||||
@@ -347,6 +359,21 @@ struct ContentDetailView: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if isShowFollowNotifyDialog {
|
||||
CreatorFollowNotifyDialog(
|
||||
isShowing: $isShowFollowNotifyDialog,
|
||||
onClickNotifyAll: {
|
||||
viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: true)
|
||||
},
|
||||
onClickNotifyNone: {
|
||||
viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: false)
|
||||
},
|
||||
onClickUnFollow: {
|
||||
viewModel.creatorFollow(creatorId: creatorId, follow: false, notify: false)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
.sheet(
|
||||
isPresented: $viewModel.isShowShareView,
|
||||
|
Reference in New Issue
Block a user