From 642dcb8ba71c3c0945c5f7c6c60221006f1b511b Mon Sep 17 00:00:00 2001 From: Sangwoo Byeon Date: Wed, 19 Jun 2024 14:29:58 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#192=20-=20=EC=8B=A0=EA=B3=A0=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=ED=81=B4=EB=A6=AD=20=ED=9B=84=20=EA=B5=AC=EA=B8=80?= =?UTF-8?q?=ED=8F=BC=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/ViewControllers/HomeViewController.swift | 9 +++++++-- .../MyPage/ViewControllers/MyPageViewController.swift | 6 ++++++ .../Post/ViewControllers/PostDetailViewController.swift | 9 +++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift index 12754ab8..ca2d56bb 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift @@ -26,6 +26,7 @@ final class HomeViewController: UIViewController { var hasAppearedBefore = false var reportTargetNickname: String = "" var relateText: String = "" + let warnUserURL = URL(string: StringLiterals.Network.warnUserGoogleFormURL) var transparentReasonView = DontBePopupReasonView() var deletePostPopupVC = DeletePopupViewController(viewModel: DeletePostViewModel(networkProvider: NetworkService())) @@ -44,8 +45,6 @@ final class HomeViewController: UIViewController { private lazy var fifthReason = self.transparentReasonView.fifthReasonView.radioButton.publisher(for: .touchUpInside).map { _ in }.eraseToAnyPublisher() private lazy var sixthReason = self.transparentReasonView.sixthReasonView.radioButton.publisher(for: .touchUpInside).map { _ in }.eraseToAnyPublisher() private lazy var isPushAllowed = PassthroughSubject() - - let warnUserURL = NSURL(string: "\(StringLiterals.Network.warnUserGoogleFormURL)") // MARK: - UI Components @@ -745,6 +744,12 @@ extension HomeViewController: DontBePopupDelegate { func confirmButtonTapped() { reportPopupView.removeFromSuperview() + let warnView: SFSafariViewController + if let warnURL = self.warnUserURL { + warnView = SFSafariViewController(url: warnURL) + self.present(warnView, animated: true, completion: nil) + } + Task { do { if let accessToken = KeychainWrapper.loadToken(forKey: "accessToken") { diff --git a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift index 1e4ae257..2c944b26 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift @@ -818,6 +818,12 @@ extension MyPageViewController: DontBePopupDelegate { } else { rootView.reportPopupView.removeFromSuperview() + let warnView: SFSafariViewController + if let warnURL = self.warnUserURL { + warnView = SFSafariViewController(url: warnURL) + self.present(warnView, animated: true, completion: nil) + } + Task { do { if let accessToken = KeychainWrapper.loadToken(forKey: "accessToken") { diff --git a/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift index 7fdd1a3a..0d8eae5a 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift @@ -29,8 +29,6 @@ final class PostDetailViewController: UIViewController { var collectionHeaderView: PostDetailCollectionHeaderView? - let warnUserURL = NSURL(string: "\(StringLiterals.Network.warnUserGoogleFormURL)") - let viewModel: PostDetailViewModel private var cancelBag = CancelBag() @@ -55,6 +53,7 @@ final class PostDetailViewController: UIViewController { var contentText: String = "" var reportTargetNickname: String = "" var relateText: String = "" + let warnUserURL = URL(string: StringLiterals.Network.warnUserGoogleFormURL) // MARK: - UI Components @@ -1071,6 +1070,12 @@ extension PostDetailViewController: DontBePopupDelegate { func confirmButtonTapped() { reportPopupView.removeFromSuperview() + let warnView: SFSafariViewController + if let warnURL = self.warnUserURL { + warnView = SFSafariViewController(url: warnURL) + self.present(warnView, animated: true, completion: nil) + } + Task { do { if let accessToken = KeychainWrapper.loadToken(forKey: "accessToken") {