From 5e3d4acdb12686728b05118541e1d1fba2aba880 Mon Sep 17 00:00:00 2001 From: mingun Date: Mon, 11 Dec 2023 11:52:26 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20=20=EC=B2=98=EC=9D=8C=20=EC=8B=9C?= =?UTF-8?q?=EC=9E=91=20=EC=8B=9C,=20=EC=9E=90=EB=8F=99=20=EC=9E=AC?= =?UTF-8?q?=EC=83=9D=EB=90=98=EC=A7=80=20=EC=95=8A=EC=95=98=EB=8D=98=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bind 하기 전에 timer을 실행시켜준 것이 문제였음 --- .../Presentation/RewindJourneyViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift b/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift index 0a5526f..ec7c7a2 100644 --- a/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift +++ b/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift @@ -51,6 +51,7 @@ public final class RewindJourneyViewController: UIViewController { private var presentingImageIndex: Int? { didSet { DispatchQueue.main.async { self.changeProgressViews() } + self.restartTimer() } } @@ -89,9 +90,9 @@ public final class RewindJourneyViewController: UIViewController { public override func viewDidLoad() { super.viewDidLoad() + self.progressViewBinding() self.timerBinding() self.configure() - self.bind() self.viewModel.trigger(.viewNeedsLoaded) } @@ -105,7 +106,7 @@ public final class RewindJourneyViewController: UIViewController { // MARK: - Combine Binding - private func bind() { + private func progressViewBinding() { self.viewModel.state.photoURLs .sink { [weak self] urls in self?.configureProgressViewsLayout(urls: urls) @@ -124,8 +125,8 @@ public final class RewindJourneyViewController: UIViewController { } private func restartTimer() { - self.viewModel.trigger(.startAutoPlay) self.viewModel.trigger(.stopAutoPlay) + self.viewModel.trigger(.startAutoPlay) } // MARK: - Configuration @@ -279,7 +280,6 @@ public final class RewindJourneyViewController: UIViewController { self.progressViews?[index].isLeftOfCurrentHighlighting = index < presentingIndex ? true : false self.progressViews?[index].isHighlighted = index <= presentingIndex ? true : false } - self.restartTimer() } // MARK: - Actions