Skip to content

Commit

Permalink
[#57]Refactor: viewWillAppearTrigger 트리거 제거
Browse files Browse the repository at this point in the history
- 기존에는 Falling 화면에 진입했을 때, 타이머를 멈추도록 구현했는데, 더블 클릭을 했을 때만 멈추도록 수정
  • Loading branch information
Minny27 authored and ibcylon committed Feb 2, 2024
1 parent a1c39be commit fd49f76
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ final class FallingHomeViewController: TFBaseViewController {
let initialTrigger = Driver<Void>.just(())
let timerOverTrigger = timeOverSubject.asDriverOnErrorJustEmpty()

let viewWillAppearTrigger = self.rx.viewWillAppear.map { _ in true }.asDriverOnErrorJustEmpty()
let viewWillDisAppearTrigger = self.rx.viewWillDisAppear.map { _ in false }.asDriverOnErrorJustEmpty()
let timerActiveRelay = BehaviorRelay(value: true)
let cardDoubleTapTrigger = self.homeView.collectionView.rx
Expand All @@ -59,11 +58,7 @@ final class FallingHomeViewController: TFBaseViewController {
.withLatestFrom(timerActiveRelay) { !$1 }
.asDriverOnErrorJustEmpty()

cardDoubleTapTrigger
.drive(timerActiveRelay)
.disposed(by: disposeBag)

Driver.merge(viewWillAppearTrigger, viewWillDisAppearTrigger)
Driver.merge(cardDoubleTapTrigger, viewWillDisAppearTrigger)
.drive(timerActiveRelay)
.disposed(by: disposeBag)

Expand Down

0 comments on commit fd49f76

Please sign in to comment.