Skip to content

Commit

Permalink
fix: fix the timer(#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
akrudal committed Jan 16, 2024
1 parent 5fcd910 commit 3cdd1d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 3cdd1d1

Please sign in to comment.