From dabb9141ddec7cc78cd65844d6f74153486af892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8E=E1=85=AC=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=8B?= =?UTF-8?q?=E1=85=B5=E1=86=AB?= Date: Tue, 10 Feb 2026 17:29:15 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EB=A3=A8=ED=8B=B4=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20=ED=9B=84=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=ED=91=9C=EC=8B=9C=20(#T3-208)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Common/Extension/Notification+.swift | 1 + .../View/RoutineCreationViewController.swift | 1 + .../ViewModel/RoutineCreationViewModel.swift | 12 ++++++++++++ .../RoutineList/View/RoutineListViewController.swift | 11 +++++++++++ 4 files changed, 25 insertions(+) diff --git a/Projects/Presentation/Sources/Common/Extension/Notification+.swift b/Projects/Presentation/Sources/Common/Extension/Notification+.swift index 3df19b5..a4def73 100644 --- a/Projects/Presentation/Sources/Common/Extension/Notification+.swift +++ b/Projects/Presentation/Sources/Common/Extension/Notification+.swift @@ -10,4 +10,5 @@ import Foundation extension Notification.Name { static let showRecommendedRoutineToast = Notification.Name("showRecommendedRoutineToast") static let showDeletedRoutineToast = Notification.Name("showDeletedRoutineToast") + static let showUpdatedRoutineToast = Notification.Name("showUpdatedRoutineToast") } diff --git a/Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift b/Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift index b85304f..843bf6a 100644 --- a/Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift +++ b/Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift @@ -155,6 +155,7 @@ final class RoutineCreationViewController: BaseViewController private let routineStackView = UIStackView() private var routineCardViews: [String: RoutineCardView] = [:] private let deleteToastMessage: String = "삭제가 완료되었습니다." + private let updateToastMessage: String = "루틴 수정이 완료되었습니다." private var toastMessageView = ToastView(message: "") private var dimmedView: UIView? private var cancellables: Set @@ -149,6 +150,16 @@ final class RoutineListViewController: BaseViewController self.toastMessageView.showToastMessageView(message: deleteToastMessage) } .store(in: &cancellables) + + NotificationCenter.default.publisher(for: .showUpdatedRoutineToast) + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self else { return } + self.viewModel.action(input: .fetchRoutineList) + self.viewModel.action(input: .fetchDailyRoutine) + self.toastMessageView.showToastMessageView(message: updateToastMessage) + } + .store(in: &cancellables) } private func updateRoutineStackView(routines: [Routine]) {