From 3cdd1d1f2186f6973a080ea5f2a06f6f29d6063b Mon Sep 17 00:00:00 2001 From: Kyoungmi <1mmgm.dev@gmail.com> Date: Tue, 16 Jan 2024 15:12:30 +0900 Subject: [PATCH] fix: fix the timer(#284) --- .../Presentation/Home/Reactor/HomeViewReactor.swift | 5 ++--- .../Home/ViewControllers/HomeViewController.swift | 10 ---------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/14th-team5-iOS/App/Sources/Presentation/Home/Reactor/HomeViewReactor.swift b/14th-team5-iOS/App/Sources/Presentation/Home/Reactor/HomeViewReactor.swift index e9738ef24..c608b4548 100644 --- a/14th-team5-iOS/App/Sources/Presentation/Home/Reactor/HomeViewReactor.swift +++ b/14th-team5-iOS/App/Sources/Presentation/Home/Reactor/HomeViewReactor.swift @@ -38,7 +38,7 @@ public final class HomeViewReactor: Reactor { var showLoading: Bool = true var didPost: Bool = false var isShowingNoPostTodayView: Bool = false - var isHideCameraButton: Bool = true + var isHideCameraButton: Bool = false var descriptionText: String = "" @Pulse var timerLabelColor: UIColor = .white @@ -93,11 +93,10 @@ extension HomeViewReactor { .flatMap {_ in let time = self.calculateRemainingTime() - // 시간 이외 guard time > 0 else { return Observable.concat([ Observable.just(Mutation.hideCamerButton(true)), - Observable.just(Mutation.setDescriptionText(HomeStrings.Timer.notTime)), + Observable.just(Mutation.setDescriptionText(HomeStrings.Description.standard)), Observable.just(Mutation.setTimer(time)) ]) } diff --git a/14th-team5-iOS/App/Sources/Presentation/Home/ViewControllers/HomeViewController.swift b/14th-team5-iOS/App/Sources/Presentation/Home/ViewControllers/HomeViewController.swift index 2332f609d..a896ee1cb 100644 --- a/14th-team5-iOS/App/Sources/Presentation/Home/ViewControllers/HomeViewController.swift +++ b/14th-team5-iOS/App/Sources/Presentation/Home/ViewControllers/HomeViewController.swift @@ -283,16 +283,6 @@ extension HomeViewController { .withUnretained(self) .bind(onNext: { $0.0.setNoPostTodayView($0.1) }) .disposed(by: disposeBag) - - reactor.state - .map { $0.didPost } - .observe(on: MainScheduler.instance) - .distinctUntilChanged() - .withUnretained(self) - .bind(onNext: { - $0.0.hideCameraButton($0.1) - }) - .disposed(by: disposeBag) } }