From 4ff30bf0beaf791ca54ae1917099da4e25af147a Mon Sep 17 00:00:00 2001 From: enebin Date: Thu, 30 Apr 2026 22:19:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=95=8C=EB=A6=BC=20=EB=81=84=EA=B8=B0?= =?UTF-8?q?=20=EC=A0=84=20=ED=99=95=EC=9D=B8=20=EC=96=BC=EB=9F=BF=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 알림이 켜진 상태에서 알림설정 행을 탭하면 AI 분석결과/기록 리마인드 알림을 받지 못하게 됨을 알리는 확인 얼럿을 띄운 뒤 설정 앱으로 이동한다. --- .../Sources/MyPage/MyPageViewController.swift | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/FoodDiary/Presentation/Sources/MyPage/MyPageViewController.swift b/FoodDiary/Presentation/Sources/MyPage/MyPageViewController.swift index 94e8e58b..90df47dd 100644 --- a/FoodDiary/Presentation/Sources/MyPage/MyPageViewController.swift +++ b/FoodDiary/Presentation/Sources/MyPage/MyPageViewController.swift @@ -415,7 +415,11 @@ extension MyPageViewController: UITableViewDelegate { switch row { case .notificationSetting: - openAppSettings() + if viewModel.state.isNotificationEnabled { + showNotificationDisableConfirmAlert() + } else { + openAppSettings() + } case .privacy: openExternalLink("https://www.notion.so/enebin/311c690fca2b80bc8c89c5f7cc5cb35c?source=copy_link") case .customerInquiry: @@ -442,6 +446,19 @@ extension MyPageViewController: UITableViewDelegate { present(alert, animated: true) } + private func showNotificationDisableConfirmAlert() { + let alert = UIAlertController( + title: "알림을 끄시겠어요?", + message: "알림을 끄면 AI 분석결과와 기록 리마인드 알림을 받아 볼 수 없어요.", + preferredStyle: .alert + ) + alert.addAction(UIAlertAction(title: "취소", style: .cancel)) + alert.addAction(UIAlertAction(title: "설정으로 이동", style: .default) { [weak self] _ in + self?.openAppSettings() + }) + present(alert, animated: true) + } + private func openAppSettings() { guard let url = URL(string: UIApplication.openSettingsURLString) else { return } UIApplication.shared.open(url)