From 31696ce7dacc33028df9c744802cd43ae6557f71 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 23 Sep 2024 17:18:04 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=8C=EB=A6=BC=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=9D=B4=20=EB=8B=AB=ED=9E=90=20=EB=95=8C=20?= =?UTF-8?q?creatorId=EA=B0=80=200=EC=9C=BC=EB=A1=9C=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EB=90=98=EB=A9=B4=EC=84=9C=20=ED=8C=94=EB=A1=9C=EC=9E=89?= =?UTF-8?q?=EA=B3=BC=20=EC=95=8C=EB=A6=BC=EC=84=A4=EC=A0=95=EC=9D=B4=20?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Content/Detail/ContentDetailView.swift | 12 ++++-------- .../Content/Series/Detail/SeriesDetailView.swift | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) 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 } ) }