From c5c1819416e2ca2569b0df213571eb074efa8585 Mon Sep 17 00:00:00 2001 From: yungu0010 Date: Fri, 16 Feb 2024 15:39:58 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#230=20-=20=EC=95=B1=20=ED=94=BC?= =?UTF-8?q?=EB=93=9C=EB=B0=B1=20=EC=B0=BD=EA=B5=AC=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?-=20AnalyticsEvent=20=EC=B6=94=EA=B0=80=20-=20=EC=95=B1=20?= =?UTF-8?q?=ED=94=BC=EB=93=9C=EB=B0=B1=20=EC=B0=BD=EA=B5=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iOS-NOTTODO/Global/Enum/AnalyticsEvent.swift | 1 + iOS-NOTTODO/iOS-NOTTODO/Global/Enum/MyInfoURL.swift | 4 +++- .../iOS-NOTTODO/Global/Literals/Strings.swift | 7 +++++++ .../Presentation/MyInfo/Model/MyInfoModel.swift | 13 +++++++------ .../Viewcontrollers/MyInfoViewController.swift | 11 ++++------- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/AnalyticsEvent.swift b/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/AnalyticsEvent.swift index f25d6069..8abac0aa 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/AnalyticsEvent.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/AnalyticsEvent.swift @@ -200,6 +200,7 @@ enum AnalyticsEvent { case clickGuide = "click_guide" case clickFaq = "click_faq" case clickNotice = "click_notice" + case clickSuggestion = "click_suggestion" case clickQuestion = "click_question" case clickTerms = "click_terms" case clickOpenSource = "click_opensource" diff --git a/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/MyInfoURL.swift b/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/MyInfoURL.swift index b8b554f4..ab1c676b 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/MyInfoURL.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Global/Enum/MyInfoURL.swift @@ -10,7 +10,7 @@ import Foundation import SafariServices enum MyInfoURL { - case guid, faq, notice, question, service, personalInfo, googleForm + case guid, faq, notice, suggestoin, question, service, personalInfo, googleForm var url: String { switch self { case .guid: @@ -19,6 +19,8 @@ enum MyInfoURL { return "https://teamnottodo.notion.site/a6ef7036bde24e289e576ace099f39dc" case .notice: return "https://teamnottodo.notion.site/a5dbb310ec1d43baae02b7e9bf0b3411" + case .suggestoin: + return "https://forms.gle/xKq4oV8u7TQawKtE6" case .question: return "http://pf.kakao.com/_fUIQxj/chat" case .service: diff --git a/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift b/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift index f4c002ef..e96422ef 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift @@ -118,6 +118,13 @@ struct I18N { static let withdraw = "회원 탈퇴" static let logoutAlertTitle = "로그아웃 하시겠습니까?" static let logoutAlertmessage = "로그아웃을 하면\n다른 기기와 낫투두 기록을 연동하지 못해요." + static let guide = "낫투두 가이드" + static let oftenQuestion = "자주 묻는 질문" + static let notice = "공지사항" + static let sendFeedback = "의견 보내기" + static let inquiry = "1:1 문의" + static let version = "버전 정보" + static let policies = "약관 및 정책" /// Onboarding diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Model/MyInfoModel.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Model/MyInfoModel.swift index 7396ce45..b7f39ca1 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Model/MyInfoModel.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Model/MyInfoModel.swift @@ -18,12 +18,13 @@ struct InfoModel: Hashable { user: UserDefaults.standard.bool(forKey: DefaultKeys.isAppleLogin) ? KeychainUtil.getAppleUsername() : KeychainUtil.getKakaoNickname(), email: UserDefaults.standard.bool(forKey: DefaultKeys.isAppleLogin) ? KeychainUtil.getAppleEmail() : KeychainUtil.getKakaoEmail())] - static let support: [InfoModel] = [InfoModel(image: .icGuide, title: "낫투두 가이드"), - InfoModel(image: .icQuestion1, title: "자주 묻는 질문") + static let support: [InfoModel] = [InfoModel(image: .icGuide, title: I18N.guide), + InfoModel(image: .icQuestion1, title: I18N.oftenQuestion) ] - static let info: [InfoModel] = [InfoModel(title: "공지사항"), - InfoModel(title: "문의하기"), - InfoModel(title: "약관 및 정책") + static let info: [InfoModel] = [InfoModel(title: I18N.notice), + InfoModel(title: I18N.sendFeedback), + InfoModel(title: I18N.inquiry), + InfoModel(title: I18N.policies) ] - static func version() -> [InfoModel] { return [InfoModel(title: "버전 정보 "+(Utils.version ?? "1.0.0"))] } + static func version() -> [InfoModel] { return [InfoModel(title: I18N.version+(Utils.version ?? "1.0.0"))] } } diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Viewcontrollers/MyInfoViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Viewcontrollers/MyInfoViewController.swift index fff1a586..dfe6d21a 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Viewcontrollers/MyInfoViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/MyInfo/Viewcontrollers/MyInfoViewController.swift @@ -109,8 +109,7 @@ extension MyInfoViewController { }) dataSource?.supplementaryViewProvider = { collectionView, _, indexPath in - return collectionView.dequeueConfiguredReusableSupplementary(using: headerRegistration, - for: indexPath) + return collectionView.dequeueConfiguredReusableSupplementary(using: headerRegistration, for: indexPath) } } @@ -169,8 +168,8 @@ extension MyInfoViewController: UICollectionViewDelegate { urls: [.guid, .faq]) case 2: infoSectionSelection(for: indexPath, - events: [.clickNotice, .clickQuestion, .clickTerms], - urls: [.notice, .question, .service]) + events: [.clickNotice, .clickSuggestion, .clickQuestion, .clickTerms], + urls: [.notice, .suggestoin, .question, .service]) default: return } @@ -189,9 +188,7 @@ extension MyInfoViewController: UICollectionViewDelegate { events: [AnalyticsEvent.MyInfo], urls: [MyInfoURL]) { guard let item = urls.indices.contains(indexPath.item) ? urls[indexPath.item] : nil, - let event = events.indices.contains(indexPath.item) ? events[indexPath.item] : nil else { - return - } + let event = events.indices.contains(indexPath.item) ? events[indexPath.item] : nil else { return } sendAnalyticsEvent(event) { Utils.myInfoUrl(vc: self, url: item.url)