From d68643886bf366b778800f2697e92e75288dccb9 Mon Sep 17 00:00:00 2001 From: mingun Date: Mon, 11 Dec 2023 11:48:55 +0900 Subject: [PATCH] =?UTF-8?q?:art:=20Timer=20background=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=8F=8C=EB=A6=B4=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/RewindJourneyViewController.swift | 4 +++- .../RewindJourney/Presentation/RewindJourneyViewModel.swift | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift b/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift index 09d062d..0a5526f 100644 --- a/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift +++ b/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewController.swift @@ -49,7 +49,9 @@ public final class RewindJourneyViewController: UIViewController { private var cancellables: Set = [] private var presentingImageIndex: Int? { - didSet { self.changeProgressViews() } + didSet { + DispatchQueue.main.async { self.changeProgressViews() } + } } // MARK: - Properties: Timer diff --git a/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewModel.swift b/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewModel.swift index 18447aa..0c5b41e 100644 --- a/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewModel.swift +++ b/iOS/Features/RewindJourney/Sources/RewindJourney/Presentation/RewindJourneyViewModel.swift @@ -85,6 +85,7 @@ private extension RewindJourneyViewModel { func startTimer() { self.timer = Timer.publish(every: self.timerTimeInterval, on: .main, in: .common) .autoconnect() + .receive(on: DispatchQueue.global(qos: .background)) .sink { [weak self] _ in self?.state.timerPublisher.send() }