diff --git a/SodaLive/Sources/Content/Detail/ContentDetailView.swift b/SodaLive/Sources/Content/Detail/ContentDetailView.swift index c18c379..a359844 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailView.swift @@ -19,14 +19,7 @@ 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 isShowFollowNotifyDialog: Bool = false @State private var creatorId: Int = 0 var body: some View { @@ -365,12 +358,15 @@ struct ContentDetailView: View { isShowing: $isShowFollowNotifyDialog, onClickNotifyAll: { viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: true) + creatorId = 0 }, onClickNotifyNone: { viewModel.creatorFollow(creatorId: creatorId, follow: true, notify: false) + creatorId = 0 }, onClickUnFollow: { viewModel.creatorFollow(creatorId: creatorId, follow: false, notify: false) + creatorId = 0 } ) } diff --git a/SodaLive/Sources/Content/Series/Detail/SeriesDetailView.swift b/SodaLive/Sources/Content/Series/Detail/SeriesDetailView.swift index 25e3a83..0ccdc83 100644 --- a/SodaLive/Sources/Content/Series/Detail/SeriesDetailView.swift +++ b/SodaLive/Sources/Content/Series/Detail/SeriesDetailView.swift @@ -14,14 +14,7 @@ struct SeriesDetailView: View { let seriesId: Int - @State private var isShowFollowNotifyDialog: Bool = false { - didSet { - if !isShowFollowNotifyDialog { - creatorId = 0 - } - } - } - + @State private var isShowFollowNotifyDialog: Bool = false @State private var creatorId: Int = 0 var body: some View { @@ -206,12 +199,15 @@ struct SeriesDetailView: View { isShowing: $isShowFollowNotifyDialog, onClickNotifyAll: { viewModel.follow(creatorId, follow: true, notify: true) + creatorId = 0 }, onClickNotifyNone: { viewModel.follow(creatorId, follow: true, notify: false) + creatorId = 0 }, onClickUnFollow: { viewModel.follow(creatorId, follow: false, notify: false) + creatorId = 0 } ) }