Skip to content

Commit

Permalink
[Feat] #350 - 피드상세뷰 탭할 때 드롭다운 사라지도록 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Guryss committed Nov 18, 2024
1 parent 2db9286 commit e00b17b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ final class FeedDetailViewController: UIViewController {
commentSpoilerTextDidTap: commentSpoilerTextDidTap.asObservable(),
dotsButtonDidTap: rootView.dropdownButton.rx.tap,
dropdownButtonDidTap: dropdownButtonDidTap,
backgroundViewDidTap: rootView.rx.tapGesture(configuration: { gestureRecognizer, delegate in
gestureRecognizer.cancelsTouchesInView = false
}),
profileViewDidTap: profileViewDidTap.asObservable(),
commentdotsButtonDidTap: commentDotsButtonDidTap.asObservable(),
commentDropdownDidTap: commentDropdownButtonDidTap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ final class FeedDetailViewModel: ViewModelType {
// 피드 드롭다운
let dotsButtonDidTap: ControlEvent<Void>
let dropdownButtonDidTap: Observable<DropdownButtonType>
let backgroundViewDidTap: ControlEvent<UITapGestureRecognizer>

// 댓글 드롭다운
let profileViewDidTap: Observable<Int>
Expand Down Expand Up @@ -315,6 +316,13 @@ final class FeedDetailViewModel: ViewModelType {
})
.disposed(by: disposeBag)

input.backgroundViewDidTap
.bind(with: self, onNext: { owner, _ in
owner.showDropdownView.accept(false)
owner.hideCommentDropdownView.accept(())
})
.disposed(by: disposeBag)

// 댓글 드롭다운
input.profileViewDidTap
.subscribe(with: self, onNext: { owner, userId in
Expand Down

0 comments on commit e00b17b

Please sign in to comment.