From 704e60b1910c4adbfcdd004e83d5f26e33f535ac Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 12:42:22 +0900 Subject: [PATCH 1/9] =?UTF-8?q?setting:=20#407=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj | 8 ++++---- ByeBoo-iOS/fastlane/README.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj index 4fcdf4cf..7024ead0 100644 --- a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj +++ b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj @@ -307,7 +307,7 @@ CODE_SIGN_ENTITLEMENTS = "ByeBoo-iOS/ByeBoo-Dev.entitlements"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D; @@ -351,7 +351,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D; GENERATE_INFOPLIST_FILE = YES; @@ -512,7 +512,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 18.2; MACOSX_DEPLOYMENT_TARGET = 15.2; @@ -534,7 +534,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 18.2; MACOSX_DEPLOYMENT_TARGET = 15.2; diff --git a/ByeBoo-iOS/fastlane/README.md b/ByeBoo-iOS/fastlane/README.md index 891747df..d115df5a 100644 --- a/ByeBoo-iOS/fastlane/README.md +++ b/ByeBoo-iOS/fastlane/README.md @@ -15,10 +15,10 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do ## iOS -### ios beta +### ios upload_testflight ```sh -[bundle exec] fastlane ios beta +[bundle exec] fastlane ios upload_testflight ``` Push a new beta build to TestFlight From 2c1c9fd379e2263e818d9877f29cc1f48fdb1f12 Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 13:02:07 +0900 Subject: [PATCH 2/9] =?UTF-8?q?style:=20#407=20previous=5Foff=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../previous_off.imageset/Contents.json | 21 +++++++++++++++++++ .../previous_off.imageset/previous_off.svg | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json create mode 100644 ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json new file mode 100644 index 00000000..31c4b879 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "previous_off.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg new file mode 100644 index 00000000..90c0c2e0 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg @@ -0,0 +1,4 @@ + + + + From d09cb9e3ebfdc82d45d275b32c770a78d15c9ea9 Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 13:02:25 +0900 Subject: [PATCH 3/9] =?UTF-8?q?refactor:=20#407=202026=EB=85=84=203?= =?UTF-8?q?=EC=9B=94=206=EC=9D=BC=20=EC=9D=B4=EC=A0=84=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=EB=A1=9C=20=EC=9D=B4=EB=8F=99=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EB=AA=BB=ED=95=98=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 --- .../View/CommonQuest/DateNavigator.swift | 49 ++++++++++++++----- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift index 9d6aee86..26bac27b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift @@ -13,16 +13,17 @@ protocol DateNavigatorDelegate: AnyObject { final class DateNavigator: UITableViewHeaderFooterView { - weak var delegate: DateNavigatorDelegate? - private let calendar = Calendar.current private let yesterday: Int = -1 - private let tommorw: Int = 1 + private let tommorow: Int = 1 private let dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateFormat = "M월 d일" return formatter }() + private let minDate: Date + + weak var delegate: DateNavigatorDelegate? private(set) var currentDate: Date = .now private let navigatorStackView = UIStackView() @@ -31,6 +32,13 @@ final class DateNavigator: UITableViewHeaderFooterView { private(set) var nextButton = UIButton() override init(reuseIdentifier: String?) { + self.minDate = DateComponents( + calendar: calendar, + year: 2026, + month: 3, + day: 6 + ).date ?? .now + super.init(reuseIdentifier: reuseIdentifier) setStyle() @@ -120,20 +128,20 @@ extension DateNavigator { @objc private func moveYesterday() { - currentDate = getDate(by: yesterday) ?? .now - dateLabel.text = dateFormatter.string(from: currentDate) - updateNextButton() + guard !isMinDate else { return } - // TO-DO : 실제 날짜 형식으로 수정 - delegate?.dateDidChanged(to: currentDate) + moveDay(to: yesterday) } @objc private func moveTomorrow() { - currentDate = getDate(by: tommorw) ?? .now + moveDay(to: tommorow) + } + + private func moveDay(to day: Int) { + currentDate = getDate(by: day) ?? .now dateLabel.text = dateFormatter.string(from: currentDate) - updateNextButton() - + updateButtons() delegate?.dateDidChanged(to: currentDate) } @@ -141,13 +149,28 @@ extension DateNavigator { calendar.date(byAdding: .day, value: value, to: currentDate) } + private func updateButtons() { + updatePreviousButton() + updateNextButton() + } + + private func updatePreviousButton() { + let previousImage: UIImage = isMinDate ? .previousOff : .previousOn + previousButton.setImage(previousImage, for: .normal) + nextButton.isEnabled = !isMinDate + } + private func updateNextButton() { - let image: UIImage = isToday ? .nextOff : .nextOn - nextButton.setImage(image, for: .normal) + let nextImage: UIImage = isToday ? .nextOff : .nextOn + nextButton.setImage(nextImage, for: .normal) nextButton.isEnabled = !isToday } private var isToday: Bool { calendar.isDateInToday(currentDate) } + + private var isMinDate: Bool { + calendar.isDate(currentDate, inSameDayAs: minDate) + } } From de11ca9c5a07ea2b632205a1e11337a25237935f Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 13:11:42 +0900 Subject: [PATCH 4/9] =?UTF-8?q?refactor:=20#407=20profileIcon=EC=9D=B4=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=EB=A5=BC=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift index e885ec3f..37db9228 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift @@ -104,11 +104,6 @@ extension CommonQuestAnswerCell { ) { if let profileIcon { userIconView.image = profileIcon - } else { - userIconView.do { - $0.backgroundColor = .grayscale600 - $0.layer.cornerRadius = 10 - } } userNicknameLabel.text = answer.writer answerContentLabel.text = answer.content From dbd8c73fc3f80d27e69af1465602a852f37b10d1 Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 13:12:10 +0900 Subject: [PATCH 5/9] =?UTF-8?q?refactor:=20#407=20ProfileIcon=20=EC=97=B4?= =?UTF-8?q?=EA=B1=B0=ED=98=95=EC=9D=98=20sad=20=EC=BC=80=EC=9D=B4=EC=8A=A4?= =?UTF-8?q?=20rawValue=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Feature/Quest/ViewModel/CommonQuestViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift index 51f063e9..06b6f30f 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift @@ -92,7 +92,7 @@ extension CommonQuestViewModel: ViewModelType { extension CommonQuestViewModel { private enum ProfileIcon: String, CaseIterable { - case sad = "SAD" + case sad = "SADNESS" case selfUnderstanding = "SELF_UNDERSTANDING" case soso = "SO_SO" case relieved = "RELIEVED" From 768d0cd24d21a8628f883aabbf04af98d65cac0f Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 13:55:21 +0900 Subject: [PATCH 6/9] =?UTF-8?q?feat:=20#407=20=EA=B3=B5=ED=86=B5=ED=80=98?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=8B=B5=EB=B3=80=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=82=98=EC=9D=98=20=EB=8B=B5=EB=B3=80=20=EA=B5=AC=EB=B6=84?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonQuestViewController.swift | 21 ++++++++++++++- .../ViewModel/CommonQuestViewModel.swift | 26 +++++++++++++++---- .../PresentationDependencyAssembler.swift | 3 ++- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift index 190b1a97..c8cd2e85 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift @@ -14,6 +14,7 @@ final class CommonQuestViewController: BaseViewController { private let viewModel: CommonQuestViewModel private var cancellable = Set() + private var userName: String? init(viewModel: CommonQuestViewModel) { self.viewModel = viewModel @@ -38,6 +39,7 @@ final class CommonQuestViewController: BaseViewController { super.viewDidLoad() bind() + viewModel.action(.compareUserName) } override func viewWillDisappear(_ animated: Bool) { @@ -71,6 +73,11 @@ final class CommonQuestViewController: BaseViewController { extension CommonQuestViewController { func bind() { + bindCommonQuest() + bindUserName() + } + + private func bindCommonQuest() { viewModel.output.commonQuestPublisher .receive(on: DispatchQueue.main) .sink { [weak self] result in @@ -83,6 +90,15 @@ extension CommonQuestViewController { } .store(in: &cancellable) } + + private func bindUserName() { + viewModel.output.userNamePublisher + .receive(on: DispatchQueue.main) + .sink { [weak self] userName in + self?.userName = userName + } + .store(in: &cancellable) + } } extension CommonQuestViewController: DateNavigatorDelegate { @@ -134,14 +150,17 @@ extension CommonQuestViewController: UITableViewDelegate { guard let formattedWrittenAt else { return } + + let nickname = (answer.writer == userName) ? nil : answer.writer let historyViewController = ViewControllerFactory.shared.makeCommonQuestHistoryViewController() historyViewController.configure( question: viewModel.question, writtenAt: formattedWrittenAt, profileIcon: viewModel.getProfileIcon(at: answerIndex), - nickname: answer.writer, + nickname: nickname, content: answer.content, + answerID: answer.answerID, writerID: answer.writerID ) historyViewController.navigationItem.hidesBackButton = true diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift index 06b6f30f..fd8c3da3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift @@ -10,13 +10,16 @@ import UIKit final class CommonQuestViewModel { - private let cancellables = Set() - private let commonQuestSubject = PassthroughSubject, Never>.init() - private let fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase private let minute: Double = 60 private let hour: Double = 3600 private let day: Double = 86400 + private let cancellables = Set() + private let commonQuestSubject = PassthroughSubject, Never>.init() + private let userNameSubject = PassthroughSubject.init() + private let fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase + private let getUserNameUseCase: GetUserNameUseCase + private(set) var output: Output private var commonQuest: CommonQuestAnswersEntity? private var answers: [CommonQuestAnswerEntity] = [] @@ -24,10 +27,15 @@ final class CommonQuestViewModel { private var nextCursor: Int? = nil private var currentDate: String = DateFormatter.toAPIDateString(from: .now) - init(fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase) { + init( + fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase, + getUserNameUseCase: GetUserNameUseCase + ) { self.fetchCommonQuestByDateUseCase = fetchCommonQuestByDateUseCase + self.getUserNameUseCase = getUserNameUseCase self.output = Output( - commonQuestPublisher: commonQuestSubject.eraseToAnyPublisher() + commonQuestPublisher: commonQuestSubject.eraseToAnyPublisher(), + userNamePublisher: userNameSubject.eraseToAnyPublisher() ) } @@ -65,26 +73,34 @@ extension CommonQuestViewModel: ViewModelType { case viewWillAppear case moveDateButtonDidTap(selectedDate: String) case scrollAnswer + case compareUserName } struct Output { let commonQuestPublisher: AnyPublisher, Never> + let userNamePublisher: AnyPublisher } func action(_ trigger: Input) { switch trigger { case .viewWillAppear: fetchCommonQuestByDate(date: currentDate) + case .moveDateButtonDidTap(let selectedDate): currentDate = selectedDate nextCursor = nil hasMorePages = true fetchCommonQuestByDate(date: selectedDate) + case .scrollAnswer: guard hasMorePages else { return } fetchCommonQuestByDate(date: currentDate, cursor: nextCursor) + + case .compareUserName: + let userName = getUserNameUseCase.execute() + userNameSubject.send(userName) } } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift index b4a49e37..c0d041c2 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift @@ -295,7 +295,8 @@ struct PresentationDependencyAssembler: DependencyAssembler { } return CommonQuestViewModel( - fetchCommonQuestByDateUseCase: fetchCommonQuestByDateUseCase + fetchCommonQuestByDateUseCase: fetchCommonQuestByDateUseCase, + getUserNameUseCase: getUserNameUseCase ) } From 91a5110c5426dbf28a1f1c79d4048ed1e2d965c6 Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 14:47:53 +0900 Subject: [PATCH 7/9] =?UTF-8?q?refactor:=20#407=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A7=84=EC=9E=85=20=EC=8B=9C=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EA=B6=8C=ED=95=9C=20=ED=99=95=EC=9D=B8?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewController/MyPageViewController.swift | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift index 33730a2e..0880b1e3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift @@ -38,6 +38,7 @@ final class MyPageViewController: BaseViewController { viewModel.action(.viewWillAppear) viewModel.action(.checkHasEnterMyPage) + checkNotificationAuthorizationOnEnter() } override func viewDidLoad() { @@ -212,6 +213,24 @@ extension MyPageViewController { extension MyPageViewController { + private func checkNotificationAuthorizationOnEnter() { + UNUserNotificationCenter.current().getNotificationSettings { [weak self] settings in + guard let self else { return } + + let isAuthorized: Bool + switch settings.authorizationStatus { + case .authorized, .provisional, .ephemeral: + isAuthorized = true + default: + isAuthorized = false + } + + DispatchQueue.main.async { + self.rootView.featuresView.noticeView.noticeSwitch.setOn(isAuthorized, animated: false) + } + } + } + @objc private func checkNoticeAuthorizationWhenBack() { guard didOpenSetting else { return } @@ -285,13 +304,8 @@ extension MyPageViewController { switch settings.authorizationStatus { case .authorized, .provisional, .ephemeral: self.viewModel.action(.notificationSwitchDidTap) - case .denied: - self.presentMoveSettingAlert( - isOn: sender.isOn, - status: .denied - ) - case .notDetermined: - break + case .denied, .notDetermined: + self.presentMoveSettingAlert(isOn: sender.isOn, status: .authorized) @unknown default: break } From c0e09d1e2bb039b8c089c944cf771747bbd0fbf7 Mon Sep 17 00:00:00 2001 From: heoseungjun Date: Sun, 15 Mar 2026 16:05:00 +0900 Subject: [PATCH 8/9] =?UTF-8?q?Revert=20"feat:=20#407=20=EA=B3=B5=ED=86=B5?= =?UTF-8?q?=ED=80=98=EC=8A=A4=ED=8A=B8=20=EB=8B=B5=EB=B3=80=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=82=98=EC=9D=98=20=EB=8B=B5=EB=B3=80=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 768d0cd24d21a8628f883aabbf04af98d65cac0f. --- .../CommonQuestViewController.swift | 21 +-------------- .../ViewModel/CommonQuestViewModel.swift | 26 ++++--------------- .../PresentationDependencyAssembler.swift | 3 +-- 3 files changed, 7 insertions(+), 43 deletions(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift index c8cd2e85..190b1a97 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewController/CommonQuestViewController.swift @@ -14,7 +14,6 @@ final class CommonQuestViewController: BaseViewController { private let viewModel: CommonQuestViewModel private var cancellable = Set() - private var userName: String? init(viewModel: CommonQuestViewModel) { self.viewModel = viewModel @@ -39,7 +38,6 @@ final class CommonQuestViewController: BaseViewController { super.viewDidLoad() bind() - viewModel.action(.compareUserName) } override func viewWillDisappear(_ animated: Bool) { @@ -73,11 +71,6 @@ final class CommonQuestViewController: BaseViewController { extension CommonQuestViewController { func bind() { - bindCommonQuest() - bindUserName() - } - - private func bindCommonQuest() { viewModel.output.commonQuestPublisher .receive(on: DispatchQueue.main) .sink { [weak self] result in @@ -90,15 +83,6 @@ extension CommonQuestViewController { } .store(in: &cancellable) } - - private func bindUserName() { - viewModel.output.userNamePublisher - .receive(on: DispatchQueue.main) - .sink { [weak self] userName in - self?.userName = userName - } - .store(in: &cancellable) - } } extension CommonQuestViewController: DateNavigatorDelegate { @@ -150,17 +134,14 @@ extension CommonQuestViewController: UITableViewDelegate { guard let formattedWrittenAt else { return } - - let nickname = (answer.writer == userName) ? nil : answer.writer let historyViewController = ViewControllerFactory.shared.makeCommonQuestHistoryViewController() historyViewController.configure( question: viewModel.question, writtenAt: formattedWrittenAt, profileIcon: viewModel.getProfileIcon(at: answerIndex), - nickname: nickname, + nickname: answer.writer, content: answer.content, - answerID: answer.answerID, writerID: answer.writerID ) historyViewController.navigationItem.hidesBackButton = true diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift index fd8c3da3..06b6f30f 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift @@ -10,15 +10,12 @@ import UIKit final class CommonQuestViewModel { - private let minute: Double = 60 - private let hour: Double = 3600 - private let day: Double = 86400 - private let cancellables = Set() private let commonQuestSubject = PassthroughSubject, Never>.init() - private let userNameSubject = PassthroughSubject.init() private let fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase - private let getUserNameUseCase: GetUserNameUseCase + private let minute: Double = 60 + private let hour: Double = 3600 + private let day: Double = 86400 private(set) var output: Output private var commonQuest: CommonQuestAnswersEntity? @@ -27,15 +24,10 @@ final class CommonQuestViewModel { private var nextCursor: Int? = nil private var currentDate: String = DateFormatter.toAPIDateString(from: .now) - init( - fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase, - getUserNameUseCase: GetUserNameUseCase - ) { + init(fetchCommonQuestByDateUseCase: FetchCommonQuestByDateUseCase) { self.fetchCommonQuestByDateUseCase = fetchCommonQuestByDateUseCase - self.getUserNameUseCase = getUserNameUseCase self.output = Output( - commonQuestPublisher: commonQuestSubject.eraseToAnyPublisher(), - userNamePublisher: userNameSubject.eraseToAnyPublisher() + commonQuestPublisher: commonQuestSubject.eraseToAnyPublisher() ) } @@ -73,34 +65,26 @@ extension CommonQuestViewModel: ViewModelType { case viewWillAppear case moveDateButtonDidTap(selectedDate: String) case scrollAnswer - case compareUserName } struct Output { let commonQuestPublisher: AnyPublisher, Never> - let userNamePublisher: AnyPublisher } func action(_ trigger: Input) { switch trigger { case .viewWillAppear: fetchCommonQuestByDate(date: currentDate) - case .moveDateButtonDidTap(let selectedDate): currentDate = selectedDate nextCursor = nil hasMorePages = true fetchCommonQuestByDate(date: selectedDate) - case .scrollAnswer: guard hasMorePages else { return } fetchCommonQuestByDate(date: currentDate, cursor: nextCursor) - - case .compareUserName: - let userName = getUserNameUseCase.execute() - userNameSubject.send(userName) } } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift index c0d041c2..b4a49e37 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/PresentationDependencyAssembler.swift @@ -295,8 +295,7 @@ struct PresentationDependencyAssembler: DependencyAssembler { } return CommonQuestViewModel( - fetchCommonQuestByDateUseCase: fetchCommonQuestByDateUseCase, - getUserNameUseCase: getUserNameUseCase + fetchCommonQuestByDateUseCase: fetchCommonQuestByDateUseCase ) } From 152db948e4e42674a3dec4442ffe9d0aaaae1707 Mon Sep 17 00:00:00 2001 From: JURI <80569323+juri123123@users.noreply.github.com> Date: Sun, 15 Mar 2026 23:41:54 +0900 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20#407=20=EC=97=AC=EC=A0=95=20?= =?UTF-8?q?=EB=8F=8C=EC=95=84=EB=B3=B4=EA=B8=B0=20=ED=83=9C=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 --- .../Presentation/Enum/JourneyType+Presentation.swift | 11 +++++++++++ .../Feature/MyPage/View/JourneyListView.swift | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift index cfa7dadc..befc9b38 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift @@ -19,6 +19,17 @@ extension JourneyType { } } + var tagTitle: String { + switch self { + case .recording: + "이별" + case .active: + "행동형" + case .reunion: + "재회" + } + } + var description: String { return "\(title) 여정" } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift index 2c6f9430..4d9109e5 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift @@ -165,7 +165,7 @@ extension JourneyListView { journeyList.forEach { journey in let journeyView = OneLineTextBoxView( title: journey.title + " 여정", - tagTitle: journey.questType?.title, + tagTitle: journey.style?.tagTitle, tagType: isFinished ? .word3Gray : .word3Purple, isHighlighted: !isFinished )