알림설정 화면이 닫힐 때 creatorId가 0으로 설정되면서 팔로잉과 알림설정이 되지 않는 버그 수정
This commit is contained in:
parent
842cbc3073
commit
31696ce7da
|
@ -19,14 +19,7 @@ struct ContentDetailView: View {
|
||||||
@State private var isShowOrderView = false
|
@State private var isShowOrderView = false
|
||||||
@State private var isShowOrderConfirmView = false
|
@State private var isShowOrderConfirmView = false
|
||||||
@State private var isShowCommentListView = false
|
@State private var isShowCommentListView = false
|
||||||
@State private var isShowFollowNotifyDialog: Bool = false {
|
@State private var isShowFollowNotifyDialog: Bool = false
|
||||||
didSet {
|
|
||||||
if !isShowFollowNotifyDialog {
|
|
||||||
creatorId = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@State private var creatorId: Int = 0
|
@State private var creatorId: Int = 0
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
@ -365,12 +358,15 @@ struct ContentDetailView: View {
|
||||||
isShowing: $isShowFollowNotifyDialog,
|
isShowing: $isShowFollowNotifyDialog,
|
||||||
onClickNotifyAll: {
|
onClickNotifyAll: {
|
||||||
viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: true)
|
viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: true)
|
||||||
|
creatorId = 0
|
||||||
},
|
},
|
||||||
onClickNotifyNone: {
|
onClickNotifyNone: {
|
||||||
viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: false)
|
viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: false)
|
||||||
|
creatorId = 0
|
||||||
},
|
},
|
||||||
onClickUnFollow: {
|
onClickUnFollow: {
|
||||||
viewModel.creatorFollow(creatorId: creatorId, follow: false, notify: false)
|
viewModel.creatorFollow(creatorId: creatorId, follow: false, notify: false)
|
||||||
|
creatorId = 0
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,14 +14,7 @@ struct SeriesDetailView: View {
|
||||||
|
|
||||||
let seriesId: Int
|
let seriesId: Int
|
||||||
|
|
||||||
@State private var isShowFollowNotifyDialog: Bool = false {
|
@State private var isShowFollowNotifyDialog: Bool = false
|
||||||
didSet {
|
|
||||||
if !isShowFollowNotifyDialog {
|
|
||||||
creatorId = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@State private var creatorId: Int = 0
|
@State private var creatorId: Int = 0
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
@ -206,12 +199,15 @@ struct SeriesDetailView: View {
|
||||||
isShowing: $isShowFollowNotifyDialog,
|
isShowing: $isShowFollowNotifyDialog,
|
||||||
onClickNotifyAll: {
|
onClickNotifyAll: {
|
||||||
viewModel.follow(creatorId, follow: true, notify: true)
|
viewModel.follow(creatorId, follow: true, notify: true)
|
||||||
|
creatorId = 0
|
||||||
},
|
},
|
||||||
onClickNotifyNone: {
|
onClickNotifyNone: {
|
||||||
viewModel.follow(creatorId, follow: true, notify: false)
|
viewModel.follow(creatorId, follow: true, notify: false)
|
||||||
|
creatorId = 0
|
||||||
},
|
},
|
||||||
onClickUnFollow: {
|
onClickUnFollow: {
|
||||||
viewModel.follow(creatorId, follow: false, notify: false)
|
viewModel.follow(creatorId, follow: false, notify: false)
|
||||||
|
creatorId = 0
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue