From bd69c197f0914dfbf66b5beec733956e536c40b6 Mon Sep 17 00:00:00 2001 From: chansooo Date: Wed, 17 Jul 2024 22:52:32 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=83=AD=EB=B0=94=20=EC=A4=91?= =?UTF-8?q?=EB=B3=B5=20=ED=98=B8=EC=B6=9C=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/Home/Sources/Presentation/TabRouter.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Projects/Features/Home/Sources/Presentation/TabRouter.swift b/Projects/Features/Home/Sources/Presentation/TabRouter.swift index c4e2137..88abb1a 100644 --- a/Projects/Features/Home/Sources/Presentation/TabRouter.swift +++ b/Projects/Features/Home/Sources/Presentation/TabRouter.swift @@ -43,11 +43,10 @@ public final class MainTabRouter: Router, ObservableObject { } public func start() { - setupTabChangeListener() + bindTabChanged() } public func switchToTab(_ tab: MainTab) { - print("switchToTab: \(tab)") childRouters = [] switch tab { case .recommend: @@ -64,9 +63,9 @@ public final class MainTabRouter: Router, ObservableObject { } } - private func setupTabChangeListener() { + private func bindTabChanged() { $selectedTab -// .removeDuplicates() + .removeDuplicates() .sink { [weak self] newTab in self?.switchToTab(newTab) }